Implement APIv4 infrastructure (#5191)
* Implement APIv4 infrastructure * Update parameter requirement functions per feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3e2f879b77
Коммит
c01d9ad6cf
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user