aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-07 02:59:04 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-07 02:59:04 -0400
commit970cf40745a7441462461467274dc6b1b3de5eb8 (patch)
treef189f84015d8327d5d6bc7fb1b97f4362d0be2ec /internal
parent9fe382d26e5d8cbe707468bb9a019067fec7d291 (diff)
downloaddonetick-970cf40745a7441462461467274dc6b1b3de5eb8.tar.gz
donetick-970cf40745a7441462461467274dc6b1b3de5eb8.tar.bz2
donetick-970cf40745a7441462461467274dc6b1b3de5eb8.zip
resetPassword function to handle user not found case
Diffstat (limited to 'internal')
-rw-r--r--internal/user/handler.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/user/handler.go b/internal/user/handler.go
index 961851f..15e881f 100644
--- a/internal/user/handler.go
+++ b/internal/user/handler.go
@@ -283,9 +283,8 @@ func (h *Handler) resetPassword(c *gin.Context) {
}
user, err := h.userRepo.FindByEmail(c, req.Email)
if err != nil {
- c.JSON(http.StatusNotFound, gin.H{
- "error": "User not found",
- })
+ c.JSON(http.StatusOK, gin.H{})
+ log.Error("account.handler.resetPassword failed to find user")
return
}
if user.Provider != 0 {