mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 08:20:10 +00:00
fix: invite code not being marked as used
Fixes an issue where if approval and invite were enabled the code would stay as unused
This commit is contained in:
parent
059401aeab
commit
c3f768181a
1 changed files with 9 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue