This commit is contained in:
cutestnekoaqua 2023-02-13 20:26:54 +01:00
parent e9d55ff44b
commit 44990a1ddb
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}