From 0cc81624b5ba388b106741e33e073bcdafa16f97 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 295a579091..abb31bb7f2 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; }