summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-21 19:42:34 -0500
committerGitHub <noreply@github.com>2017-02-21 19:42:34 -0500
commit69cac604e09c139845d2f63ac95fb702fb5a9fe1 (patch)
tree611920333a5d55f5db0cca43bd3cb5cf1bee30e8 /store/sql_channel_store.go
parentb61115df55ea6eba9976e561a8b39bf5a297fcc9 (diff)
downloadchat-69cac604e09c139845d2f63ac95fb702fb5a9fe1.tar.gz
chat-69cac604e09c139845d2f63ac95fb702fb5a9fe1.tar.bz2
chat-69cac604e09c139845d2f63ac95fb702fb5a9fe1.zip
Implement create and get incoming webhook endpoints for APIv4 (#5407)
* Implement POST /hooks/incoming endpoint for APIv4 * Implement GET /hooks/incoming endpoint for APIv4 * Updates per feedback
Diffstat (limited to 'store/sql_channel_store.go')
-rw-r--r--store/sql_channel_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index 503b646f6..03bc70c75 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -357,7 +357,7 @@ func (s SqlChannelStore) get(id string, master bool, allowFromCache bool) StoreC
if obj, err := db.Get(model.Channel{}, id); err != nil {
result.Err = model.NewLocAppError("SqlChannelStore.Get", "store.sql_channel.get.find.app_error", nil, "id="+id+", "+err.Error())
} else if obj == nil {
- result.Err = model.NewLocAppError("SqlChannelStore.Get", "store.sql_channel.get.existing.app_error", nil, "id="+id)
+ result.Err = model.NewAppError("SqlChannelStore.Get", "store.sql_channel.get.existing.app_error", nil, "id="+id, http.StatusBadRequest)
} else {
result.Data = obj.(*model.Channel)
channelCache.AddWithExpiresInSecs(id, obj.(*model.Channel), CHANNEL_CACHE_SEC)