From 474ccda93da55aea570b691cc521f736bc851899 Mon Sep 17 00:00:00 2001 From: Lhc_fl Date: Tue, 22 Oct 2024 18:44:15 +0800 Subject: [PATCH] fix: should use invite limit cycle to calculate invite/limit --- packages/backend/src/server/api/endpoints/invite/limit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/invite/limit.ts b/packages/backend/src/server/api/endpoints/invite/limit.ts index 2786bd98d5..2ffd41ae28 100644 --- a/packages/backend/src/server/api/endpoints/invite/limit.ts +++ b/packages/backend/src/server/api/endpoints/invite/limit.ts @@ -49,7 +49,7 @@ export default class extends Endpoint { // eslint- const policies = await this.roleService.getUserPolicies(me.id); 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, }) : null;