resetPassword function to handle user not found case
This commit is contained in:
parent
9fe382d26e
commit
970cf40745
|
@ -283,9 +283,8 @@ func (h *Handler) resetPassword(c *gin.Context) {
|
||||||
}
|
}
|
||||||
user, err := h.userRepo.FindByEmail(c, req.Email)
|
user, err := h.userRepo.FindByEmail(c, req.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(http.StatusNotFound, gin.H{
|
c.JSON(http.StatusOK, gin.H{})
|
||||||
"error": "User not found",
|
log.Error("account.handler.resetPassword failed to find user")
|
||||||
})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if user.Provider != 0 {
|
if user.Provider != 0 {
|
||||||
|
|
Loading…
Reference in New Issue