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 b7ffa05848
commit e2ebe83238
No known key found for this signature in database
GPG key ID: 1899404574D6EEFC

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) {