Skip to content

Commit 587f8f3

Browse files
committed
Fix password reset bug
1 parent e849e26 commit 587f8f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/api/src/auth/auth.service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export class AuthService {
3838
}
3939

4040
async updateUserPassword(userId: Types.ObjectId, rawPassword: string): Promise<UserDocument> {
41-
const hash = this.hashPassword(rawPassword);
42-
return this.usersService.findOneByIdAndUpdate(userId, { 'profile.password': hash });
41+
const hash = await this.hashPassword(rawPassword);
42+
return this.usersService.findOneByIdAndUpdate(userId, { 'auth.password': hash });
4343
}
4444

4545
private hashPassword(input: string): Promise<string> {

0 commit comments

Comments
 (0)