pass access token through API to enforce rank

This commit is contained in:
Hazelnoot 2025-06-21 12:40:37 -04:00
parent fae87e03c0
commit 186c615e3f
166 changed files with 473 additions and 380 deletions

View file

@ -67,7 +67,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private roleService: RoleService,
private activeUsersChart: ActiveUsersChart,
) {
super(meta, paramDef, async (ps, me) => {
super(meta, paramDef, async (ps, me, token) => {
const policies = await this.roleService.getUserPolicies(me ? me.id : null);
if (!policies.btlAvailable) {
throw new ApiError(meta.errors.btlDisabled);
@ -126,7 +126,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
});
}
return await this.noteEntityService.packMany(timeline, me);
return await this.noteEntityService.packMany(timeline, me, token);
});
}
}