pass auth to metadata

This commit is contained in:
cutestnekoaqua 2023-03-18 13:06:49 +01:00
parent 04c1b395b4
commit 025f149440
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 6 additions and 1 deletions

View File

@ -105,7 +105,12 @@ export function apiStatusMastodon(router: Router): void {
const id = ctx.params.id;
const data = await client.getStatusContext(id, limitToInt(ctx.query as any));
const status = await client.getStatus(id);
const reactionsAxios = await axios.get(
let reqInstance = axios.create({
headers: {
Authorization : ctx.headers.authorization
}
});
const reactionsAxios = await reqInstance.get(
`${BASE_URL}/api/notes/reactions?noteId=${id}`,
);
const reactions: IReaction[] = reactionsAxios.data;