GWM : added status key for the forget password api

This commit is contained in:
Gowtham M 2025-08-04 15:11:20 +05:30
parent 34fa72e1e1
commit f9d43d2055

View File

@ -596,7 +596,7 @@ func main() {
//check the user type
isOAuthLogin := user.GetString("is_oauth_login")
if isOAuthLogin != "0" {
return c.JSON(http.StatusOK, map[string]string{"message": "Password reset is not available for accounts signed in with Apple or Google."})
return c.JSON(http.StatusOK, map[string]string{"status": "failed", "message": "Password reset is not available for accounts signed in with Apple or Google."})
}
name := user.GetString("name")
@ -704,7 +704,7 @@ func main() {
return err
}
return c.JSON(http.StatusOK, map[string]string{"message": "Reset link sent to your email"})
return c.JSON(http.StatusOK, map[string]string{"status": "success", "message": "Reset link sent to your email"})
})
e.Router.GET("/api/auth/reset-password", func(c echo.Context) error {