mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
change types
This commit is contained in:
parent
030d890286
commit
d6c9a142ab
1 changed files with 3 additions and 3 deletions
|
@ -301,12 +301,12 @@ export function apiAccountMastodon(router: Router): void {
|
|||
const client = getClient(BASE_URL, accessTokens);
|
||||
let users;
|
||||
try {
|
||||
const idsRaw = (ctx.query as any)["id[]"];
|
||||
const idsRaw = ctx.query["id[]"];
|
||||
const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw;
|
||||
users = ids;
|
||||
relationshopModel.id = idsRaw || "1";
|
||||
relationshopModel.id = idsRaw?.toString() || "1";
|
||||
if (!idsRaw) return [relationshopModel];
|
||||
const data = (await client.getRelationships(ids)) as any;
|
||||
const data = (await client.getRelationships(ids ? ids : [])) as any;
|
||||
ctx.body = data.data;
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
|
|
Loading…
Reference in a new issue