Convert limit parameter to int for certain Mastodon account endpoints
This commit is contained in:
parent
b7ffa05848
commit
e2ebe83238
1 changed files with 3 additions and 2 deletions
|
@ -42,6 +42,7 @@ export function apiAccountMastodon(router: Router): void {
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
language: "",
|
language: "",
|
||||||
};
|
};
|
||||||
|
console.log(acct);
|
||||||
ctx.body = acct;
|
ctx.body = acct;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -126,7 +127,7 @@ export function apiAccountMastodon(router: Router): void {
|
||||||
try {
|
try {
|
||||||
const data = await client.getAccountFollowers(
|
const data = await client.getAccountFollowers(
|
||||||
ctx.params.id,
|
ctx.params.id,
|
||||||
ctx.query as any,
|
limitToInt(ctx.query as any),
|
||||||
);
|
);
|
||||||
ctx.body = data.data;
|
ctx.body = data.data;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
@ -146,7 +147,7 @@ export function apiAccountMastodon(router: Router): void {
|
||||||
try {
|
try {
|
||||||
const data = await client.getAccountFollowing(
|
const data = await client.getAccountFollowing(
|
||||||
ctx.params.id,
|
ctx.params.id,
|
||||||
ctx.query as any,
|
limitToInt(ctx.query as any),
|
||||||
);
|
);
|
||||||
ctx.body = data.data;
|
ctx.body = data.data;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|
Loading…
Reference in a new issue