summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/emoji.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-09 00:11:04 +0100
committerWim <wim@42.be>2018-02-09 00:11:04 +0100
commit5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811 (patch)
tree09bcb3f02f968867c2ca84db1f28594dd0afb967 /vendor/github.com/mattermost/platform/model/emoji.go
parent1d33e60e36fa7b0e361990ac347ee8d620d67dcc (diff)
downloadmatterbridge-msglm-5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811.tar.gz
matterbridge-msglm-5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811.tar.bz2
matterbridge-msglm-5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811.zip
Update vendor (github.com/mattermost)
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/emoji.go')
-rw-r--r--vendor/github.com/mattermost/platform/model/emoji.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/github.com/mattermost/platform/model/emoji.go b/vendor/github.com/mattermost/platform/model/emoji.go
index 5ade868c..272616d9 100644
--- a/vendor/github.com/mattermost/platform/model/emoji.go
+++ b/vendor/github.com/mattermost/platform/model/emoji.go
@@ -6,6 +6,7 @@ package model
import (
"encoding/json"
"io"
+ "net/http"
)
type Emoji struct {
@@ -19,23 +20,23 @@ type Emoji struct {
func (emoji *Emoji) IsValid() *AppError {
if len(emoji.Id) != 26 {
- return NewLocAppError("Emoji.IsValid", "model.emoji.id.app_error", nil, "")
+ return NewAppError("Emoji.IsValid", "model.emoji.id.app_error", nil, "", http.StatusBadRequest)
}
if emoji.CreateAt == 0 {
- return NewLocAppError("Emoji.IsValid", "model.emoji.create_at.app_error", nil, "id="+emoji.Id)
+ return NewAppError("Emoji.IsValid", "model.emoji.create_at.app_error", nil, "id="+emoji.Id, http.StatusBadRequest)
}
if emoji.UpdateAt == 0 {
- return NewLocAppError("Emoji.IsValid", "model.emoji.update_at.app_error", nil, "id="+emoji.Id)
+ return NewAppError("Emoji.IsValid", "model.emoji.update_at.app_error", nil, "id="+emoji.Id, http.StatusBadRequest)
}
if len(emoji.CreatorId) != 26 {
- return NewLocAppError("Emoji.IsValid", "model.emoji.user_id.app_error", nil, "")
+ return NewAppError("Emoji.IsValid", "model.emoji.user_id.app_error", nil, "", http.StatusBadRequest)
}
if len(emoji.Name) == 0 || len(emoji.Name) > 64 || !IsValidAlphaNumHyphenUnderscore(emoji.Name, false) {
- return NewLocAppError("Emoji.IsValid", "model.emoji.name.app_error", nil, "")
+ return NewAppError("Emoji.IsValid", "model.emoji.name.app_error", nil, "", http.StatusBadRequest)
}
return nil