[mastodon-client] Code formatting pass

This commit is contained in:
Laura Hausmann 2023-07-05 21:53:00 +02:00 committed by Laura Hausmann
parent 6606abd7d9
commit 9fd44339e8
3 changed files with 32 additions and 34 deletions

View file

@ -361,8 +361,7 @@ export function apiAccountMastodon(router: Router): void {
}
},
);
router.get("/v1/featured_tags",
async (ctx) => {
router.get("/v1/featured_tags", async (ctx) => {
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
const accessTokens = ctx.headers.authorization;
const client = getClient(BASE_URL, accessTokens);
@ -375,10 +374,8 @@ export function apiAccountMastodon(router: Router): void {
ctx.status = 401;
ctx.body = e.response.data;
}
},
);
router.get("/v1/followed_tags",
async (ctx) => {
});
router.get("/v1/followed_tags", async (ctx) => {
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
const accessTokens = ctx.headers.authorization;
const client = getClient(BASE_URL, accessTokens);
@ -391,8 +388,7 @@ export function apiAccountMastodon(router: Router): void {
ctx.status = 401;
ctx.body = e.response.data;
}
},
);
});
router.get("/v1/bookmarks", async (ctx) => {
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
const accessTokens = ctx.headers.authorization;

View file

@ -60,7 +60,9 @@ export function apiStatusMastodon(router: Router): void {
if (!body.media_ids) body.media_ids = undefined;
if (body.media_ids && !body.media_ids.length) body.media_ids = undefined;
if (body.media_ids) {
body.media_ids = (body.media_ids as string[]).map(p => convertId(p, IdType.CalckeyId));
body.media_ids = (body.media_ids as string[]).map((p) =>
convertId(p, IdType.CalckeyId),
);
}
const { sensitive } = body;
body.sensitive =