From a607673019f7e00450ca39686b7046b8cccaa5cc Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Mon, 13 Feb 2023 20:41:42 +0100 Subject: [PATCH] try again --- packages/backend/src/server/api/mastodon/endpoints/account.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index 295a57909..abb31bb7f 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -304,11 +304,11 @@ export function apiAccountMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); let users; try { - const idsRaw = ctx.query["id[]"]; + const idsRaw = ctx.request.body?["id[]"] : null; const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw; users = ids; relationshopModel.id = idsRaw?.toString() || "1"; - if (!idsRaw) { + if (!(idsRaw && ids)) { ctx.body = [relationshopModel]; return; }