diff --git a/apps/api/src/account/account.service.ts b/apps/api/src/account/account.service.ts index 5f9b8f8..5c4da78 100644 --- a/apps/api/src/account/account.service.ts +++ b/apps/api/src/account/account.service.ts @@ -65,6 +65,7 @@ export class AccountService { if (!account) throw new UnauthorizedException('Account not found'); const new_password = generatePassword(); + await this.accountModel.findOneAndUpdate({ username }, { password: new_password }).exec(); return { password: new_password, username }; }