GWM : added status key for the forget password api
This commit is contained in:
parent
34fa72e1e1
commit
f9d43d2055
4
main.go
4
main.go
@ -596,7 +596,7 @@ func main() {
|
|||||||
//check the user type
|
//check the user type
|
||||||
isOAuthLogin := user.GetString("is_oauth_login")
|
isOAuthLogin := user.GetString("is_oauth_login")
|
||||||
if isOAuthLogin != "0" {
|
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")
|
name := user.GetString("name")
|
||||||
@ -704,7 +704,7 @@ func main() {
|
|||||||
return err
|
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 {
|
e.Router.GET("/api/auth/reset-password", func(c echo.Context) error {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user