pass auth to metadata

This commit is contained in:
cutestnekoaqua 2023-03-18 13:06:49 +01:00
parent 3e748cb401
commit 3122701186

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;