mew
This commit is contained in:
parent
e9d55ff44b
commit
44990a1ddb
|
@ -308,13 +308,12 @@ export function apiAccountMastodon(router: Router): void {
|
||||||
const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw;
|
const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw;
|
||||||
users = ids;
|
users = ids;
|
||||||
relationshopModel.id = idsRaw?.toString() || "1";
|
relationshopModel.id = idsRaw?.toString() || "1";
|
||||||
if (!idsRaw) return [relationshopModel];
|
if (!ids) return [relationshopModel];
|
||||||
const data = (await client.getRelationships(ids ? ids : [])) as any;
|
const data = await client.getRelationships(ids);
|
||||||
ctx.body = data.data;
|
ctx.body = data.data;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
console.error(e.response.data);
|
console.error(e.response.data);
|
||||||
e.response.data.user = users ? users : "null";
|
|
||||||
ctx.status = 401;
|
ctx.status = 401;
|
||||||
ctx.body = e.response.data;
|
ctx.body = e.response.data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue