From 14f40f00513ad87b3314b2e3d61272661d6e118d Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Mon, 13 Feb 2023 16:58:18 +0100 Subject: [PATCH] change types --- .../backend/src/server/api/mastodon/endpoints/account.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index 2d66e93747..ea90a81d9c 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -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);