Various user fixes (#38)
This commit is contained in:
parent
3e4f7fb2f4
commit
cbc5995ad3
16 changed files with 55 additions and 51 deletions
|
|
@ -67,6 +67,10 @@ func UserRequestResetPasswordToken(c echo.Context) error {
|
|||
return echo.NewHTTPError(http.StatusBadRequest, "No username provided.")
|
||||
}
|
||||
|
||||
if err := c.Validate(pwTokenReset); err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, err)
|
||||
}
|
||||
|
||||
err := models.RequestUserPasswordResetToken(&pwTokenReset)
|
||||
if err != nil {
|
||||
return handler.HandleHTTPError(err, c)
|
||||
|
|
|
|||
Reference in a new issue