summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/compliance.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/compliance.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/compliance.go')
-rw-r--r--vendor/github.com/mattermost/platform/model/compliance.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/mattermost/platform/model/compliance.go b/vendor/github.com/mattermost/platform/model/compliance.go
index 14f8f4a5..3134ddba 100644
--- a/vendor/github.com/mattermost/platform/model/compliance.go
+++ b/vendor/github.com/mattermost/platform/model/compliance.go
@@ -6,6 +6,7 @@ package model
import (
"encoding/json"
"io"
+ "net/http"
"strings"
)
@@ -75,27 +76,27 @@ func (me *Compliance) JobName() string {
func (me *Compliance) IsValid() *AppError {
if len(me.Id) != 26 {
- return NewLocAppError("Compliance.IsValid", "model.compliance.is_valid.id.app_error", nil, "")
+ return NewAppError("Compliance.IsValid", "model.compliance.is_valid.id.app_error", nil, "", http.StatusBadRequest)
}
if me.CreateAt == 0 {
- return NewLocAppError("Compliance.IsValid", "model.compliance.is_valid.create_at.app_error", nil, "")
+ return NewAppError("Compliance.IsValid", "model.compliance.is_valid.create_at.app_error", nil, "", http.StatusBadRequest)
}
if len(me.Desc) > 512 || len(me.Desc) == 0 {
- return NewLocAppError("Compliance.IsValid", "model.compliance.is_valid.desc.app_error", nil, "")
+ return NewAppError("Compliance.IsValid", "model.compliance.is_valid.desc.app_error", nil, "", http.StatusBadRequest)
}
if me.StartAt == 0 {
- return NewLocAppError("Compliance.IsValid", "model.compliance.is_valid.start_at.app_error", nil, "")
+ return NewAppError("Compliance.IsValid", "model.compliance.is_valid.start_at.app_error", nil, "", http.StatusBadRequest)
}
if me.EndAt == 0 {
- return NewLocAppError("Compliance.IsValid", "model.compliance.is_valid.end_at.app_error", nil, "")
+ return NewAppError("Compliance.IsValid", "model.compliance.is_valid.end_at.app_error", nil, "", http.StatusBadRequest)
}
if me.EndAt <= me.StartAt {
- return NewLocAppError("Compliance.IsValid", "model.compliance.is_valid.start_end_at.app_error", nil, "")
+ return NewAppError("Compliance.IsValid", "model.compliance.is_valid.start_end_at.app_error", nil, "", http.StatusBadRequest)
}
return nil