From 44990a1ddb996d7663fe25444b01e5cf2bda7df6 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Mon, 13 Feb 2023 20:26:54 +0100 Subject: [PATCH] mew --- .../backend/src/server/api/mastodon/endpoints/account.ts | 5 ++--- 1 file changed, 2 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 7a3df03bdb..8c0111f999 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -308,13 +308,12 @@ export function apiAccountMastodon(router: Router): void { const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw; users = ids; relationshopModel.id = idsRaw?.toString() || "1"; - if (!idsRaw) return [relationshopModel]; - const data = (await client.getRelationships(ids ? ids : [])) as any; + if (!ids) return [relationshopModel]; + const data = await client.getRelationships(ids); ctx.body = data.data; } catch (e: any) { console.error(e); console.error(e.response.data); - e.response.data.user = users ? users : "null"; ctx.status = 401; ctx.body = e.response.data; }