From ab4612ff12cc1baca266f18e477672a7256508ac Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Wed, 17 Jan 2024 17:54:25 +0300 Subject: [PATCH] apps/api: fix /reset-password --- apps/api/src/account/account.service.ts | 1 + 1 file changed, 1 insertion(+) 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 }; }