fix change password and support 3 decimal places
This commit is contained in:
@@ -169,7 +169,7 @@ func changePassword(c *gin.Context) {
|
||||
}
|
||||
|
||||
if user.CheckPassword(request.OldPassword) != nil {
|
||||
c.JSON(http.StatusForbidden, common.NewError("changePassword", errors.New("Not Registered email or invalid password")))
|
||||
c.JSON(http.StatusForbidden, common.NewError("changePassword", errors.New("Incorrect old password")))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@ type RegisterRequest struct {
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
OldPassword string `form:"oldPassword" json:"oldPassword" binding:"required,min=8,max=255"`
|
||||
OldPassword string `form:"oldPassword" json:"oldPassword" binding:"required,max=255"`
|
||||
NewPassword string `form:"newPassword" json:"newPassword" binding:"required,min=8,max=255"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user