From d83e2f2c7ab3a2f8963bc5b3c172f302732dd9ca 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 7a3df03bd..8c0111f99 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; }