apps/api: fix /reset-password
This commit is contained in:
parent
f8c78bfa40
commit
ab4612ff12
@ -65,6 +65,7 @@ export class AccountService {
|
|||||||
if (!account) throw new UnauthorizedException('Account not found');
|
if (!account) throw new UnauthorizedException('Account not found');
|
||||||
|
|
||||||
const new_password = generatePassword();
|
const new_password = generatePassword();
|
||||||
|
await this.accountModel.findOneAndUpdate({ username }, { password: new_password }).exec();
|
||||||
|
|
||||||
return { password: new_password, username };
|
return { password: new_password, username };
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user