diff --git a/packages/backend/src/server/api/SignupApiService.ts b/packages/backend/src/server/api/SignupApiService.ts index 418656fdbc..c07389d975 100644 --- a/packages/backend/src/server/api/SignupApiService.ts +++ b/packages/backend/src/server/api/SignupApiService.ts @@ -199,7 +199,7 @@ export class SignupApiService { reply.code(204); return; } else if (instance.approvalRequiredForSignup) { - await this.signupService.signup({ + const { account } = await this.signupService.signup({ username, password, host, reason, }); @@ -209,6 +209,14 @@ export class SignupApiService { 'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.'); } + if (ticket) { + await this.registrationTicketsRepository.update(ticket.id, { + usedAt: new Date(), + usedBy: account, + usedById: account.id, + }); + } + reply.code(204); return; } else {