Convert limit parameter to int for certain Mastodon account endpoints

This commit is contained in:
Luna 2023-03-01 23:45:34 -05:00
parent bd15a1d8d6
commit 07d45c6a70

View file

@ -42,6 +42,7 @@ export function apiAccountMastodon(router: Router): void {
sensitive: false,
language: "",
};
console.log(acct);
ctx.body = acct;
} catch (e: any) {
console.error(e);
@ -126,7 +127,7 @@ export function apiAccountMastodon(router: Router): void {
try {
const data = await client.getAccountFollowers(
ctx.params.id,
ctx.query as any,
limitToInt(ctx.query as any),
);
ctx.body = data.data;
} catch (e: any) {
@ -146,7 +147,7 @@ export function apiAccountMastodon(router: Router): void {
try {
const data = await client.getAccountFollowing(
ctx.params.id,
ctx.query as any,
limitToInt(ctx.query as any),
);
ctx.body = data.data;
} catch (e: any) {