mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-27 15:45:32 +00:00
Integration tests (#71)
This commit is contained in:
@@ -55,6 +55,10 @@ func UserChangePassword(c echo.Context) error {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No password provided.")
|
||||
}
|
||||
|
||||
if newPW.OldPassword == "" {
|
||||
return handler.HandleHTTPError(models.ErrEmptyOldPassword{}, c)
|
||||
}
|
||||
|
||||
// Check the current password
|
||||
if _, err = models.CheckUserCredentials(&models.UserLogin{Username: doer.Username, Password: newPW.OldPassword}); err != nil {
|
||||
return handler.HandleHTTPError(err, c)
|
||||
|
||||
Reference in New Issue
Block a user