pass access token through API to enforce rank
This commit is contained in:
parent
fae87e03c0
commit
186c615e3f
166 changed files with 473 additions and 380 deletions
|
|
@ -58,7 +58,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private idService: IdService,
|
||||
private moderationLogService: ModerationLogService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
super(meta, paramDef, async (ps, me, token) => {
|
||||
if (ps.expiresAt && isNaN(Date.parse(ps.expiresAt))) {
|
||||
throw new ApiError(meta.errors.invalidDateTime);
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
invitations: tickets,
|
||||
});
|
||||
|
||||
return await this.inviteCodeEntityService.packMany(tickets, me);
|
||||
return await this.inviteCodeEntityService.packMany(tickets, me, token);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue