fix: should use invite limit cycle to calculate invite/limit

This commit is contained in:
Lhc_fl 2024-10-22 18:44:15 +08:00 committed by kakkokari-gtyih
parent 15ae1605ec
commit 474ccda93d
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const policies = await this.roleService.getUserPolicies(me.id); const policies = await this.roleService.getUserPolicies(me.id);
const count = policies.inviteLimit ? await this.registrationTicketsRepository.countBy({ const count = policies.inviteLimit ? await this.registrationTicketsRepository.countBy({
id: MoreThan(this.idService.gen(Date.now() - (policies.inviteExpirationTime * 60 * 1000))), id: MoreThan(this.idService.gen(Date.now() - (policies.inviteLimitCycle * 60 * 1000))),
createdById: me.id, createdById: me.id,
}) : null; }) : null;