update Change password

This commit is contained in:
Hoang 2021-11-23 17:47:23 +07:00
parent 4264ef71f1
commit 54c9a2cc07
1 changed files with 3 additions and 2 deletions

View File

@ -295,6 +295,7 @@ func ChangeUserPassword(userID string, opt model.ChangePasswordOptions) error {
if err = updateOneByCondition(ctx, bson.M{"_id": user.ID}, bson.M{ if err = updateOneByCondition(ctx, bson.M{"_id": user.ID}, bson.M{
"$set": bson.M{ "$set": bson.M{
"hashedPassword": internal.HashPassword(opt.NewPassword), "hashedPassword": internal.HashPassword(opt.NewPassword),
"requireToChangePassword": false,
"updatedAt": internal.Now(), "updatedAt": internal.Now(),
}, },
}); err != nil { }); err != nil {