diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-01-30 08:30:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 08:30:02 -0500 |
commit | c01d9ad6cf3f8bb2ad4145441816598d8ffa2d9e (patch) | |
tree | f995a08e296b5088df2a882ab70251c7b2b8cfe7 /utils/password.go | |
parent | 3e2f879b77b9b9d089bc8f83304b8b21b83c5bd9 (diff) | |
download | chat-c01d9ad6cf3f8bb2ad4145441816598d8ffa2d9e.tar.gz chat-c01d9ad6cf3f8bb2ad4145441816598d8ffa2d9e.tar.bz2 chat-c01d9ad6cf3f8bb2ad4145441816598d8ffa2d9e.zip |
Implement APIv4 infrastructure (#5191)
* Implement APIv4 infrastructure
* Update parameter requirement functions per feedback
Diffstat (limited to 'utils/password.go')
-rw-r--r-- | utils/password.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/password.go b/utils/password.go index dc1d771b8..b129869d3 100644 --- a/utils/password.go +++ b/utils/password.go @@ -4,8 +4,10 @@ package utils import ( - "github.com/mattermost/platform/model" + "net/http" "strings" + + "github.com/mattermost/platform/model" ) func IsPasswordValid(password string) *model.AppError { @@ -57,7 +59,7 @@ func IsPasswordValid(password string) *model.AppError { } if isError { - return model.NewLocAppError("User.IsValid", id+".app_error", map[string]interface{}{"Min": min}, "") + return model.NewAppError("User.IsValid", id+".app_error", map[string]interface{}{"Min": min}, "", http.StatusBadRequest) } return nil |