backend: status adjustments
This commit is contained in:
@@ -231,7 +231,7 @@ func (uc *UserController) LoginHandler(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
utils.RespondWithError(c, fmt.Errorf("%v %v", user.FirstName, user.LastName),
|
utils.RespondWithError(c, fmt.Errorf("%v %v(%v)", user.FirstName, user.LastName, user.Email),
|
||||||
"Login Error; wrong password",
|
"Login Error; wrong password",
|
||||||
http.StatusNotAcceptable,
|
http.StatusNotAcceptable,
|
||||||
errors.Responses.Fields.Login,
|
errors.Responses.Fields.Login,
|
||||||
@@ -353,9 +353,10 @@ func (uc *UserController) VerifyMailHandler(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
user.Status = constants.ActiveStatus
|
user.Status = constants.VerifiedStatus
|
||||||
user.Verification = *verification
|
user.Verification = *verification
|
||||||
user.ID = verification.UserID
|
user.ID = verification.UserID
|
||||||
|
user.Password = ""
|
||||||
|
|
||||||
uc.Service.UpdateUser(user)
|
uc.Service.UpdateUser(user)
|
||||||
logger.Info.Printf("Verified User: %#v", user.Email)
|
logger.Info.Printf("Verified User: %#v", user.Email)
|
||||||
|
|||||||
Reference in New Issue
Block a user