mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
fix: Run to boolean conversion in mastoAPI public and hashtag timelines (#9710)
This commit is contained in:
commit
949d991424
@ -92,8 +92,8 @@ export function apiTimelineMastodon(router: Router): void {
|
||||
try {
|
||||
const query: any = ctx.query;
|
||||
const data = query.local
|
||||
? await client.getLocalTimeline(limitToInt(query))
|
||||
: await client.getPublicTimeline(limitToInt(query));
|
||||
? await client.getLocalTimeline(argsToBools(limitToInt(query)))
|
||||
: await client.getPublicTimeline(argsToBools(limitToInt(query)));
|
||||
ctx.body = toTextWithReaction(data.data, ctx.hostname);
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
@ -111,7 +111,7 @@ export function apiTimelineMastodon(router: Router): void {
|
||||
try {
|
||||
const data = await client.getTagTimeline(
|
||||
ctx.params.hashtag,
|
||||
limitToInt(ctx.query),
|
||||
argsToBools(limitToInt(ctx.query)),
|
||||
);
|
||||
ctx.body = toTextWithReaction(data.data, ctx.hostname);
|
||||
} catch (e: any) {
|
||||
|
Loading…
Reference in New Issue
Block a user