change types

This commit is contained in:
cutestnekoaqua 2023-02-13 16:58:18 +01:00
parent a480e1be55
commit 14f40f0051
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 3 additions and 3 deletions

View File

@ -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);