summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-26 08:16:57 -0400
committerGitHub <noreply@github.com>2017-06-26 08:16:57 -0400
commit23ccfc845ca2350075f6027e16c6206fc7b71716 (patch)
tree3fd1f896a5a24b43913be03b21c85638dd7c356e /store
parentfe7e9d95b30ae2195fcba68db960866db91ce045 (diff)
downloadchat-23ccfc845ca2350075f6027e16c6206fc7b71716.tar.gz
chat-23ccfc845ca2350075f6027e16c6206fc7b71716.tar.bz2
chat-23ccfc845ca2350075f6027e16c6206fc7b71716.zip
Move remaining actions over to use redux and v4 endpoints (#6720)
Diffstat (limited to 'store')
-rw-r--r--store/sql_post_store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 3abafbbcc..388414cd9 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -318,7 +318,7 @@ func (s SqlPostStore) Get(id string) StoreChannel {
var post model.Post
err := s.GetReplica().SelectOne(&post, "SELECT * FROM Posts WHERE Id = :Id AND DeleteAt = 0", map[string]interface{}{"Id": id})
if err != nil {
- result.Err = model.NewLocAppError("SqlPostStore.GetPost", "store.sql_post.get.app_error", nil, "id="+id+err.Error())
+ result.Err = model.NewAppError("SqlPostStore.GetPost", "store.sql_post.get.app_error", nil, "id="+id+err.Error(), http.StatusNotFound)
storeChannel <- result
close(storeChannel)
return
@@ -371,7 +371,7 @@ func (s SqlPostStore) GetSingle(id string) StoreChannel {
var post model.Post
err := s.GetReplica().SelectOne(&post, "SELECT * FROM Posts WHERE Id = :Id AND DeleteAt = 0", map[string]interface{}{"Id": id})
if err != nil {
- result.Err = model.NewLocAppError("SqlPostStore.GetSingle", "store.sql_post.get.app_error", nil, "id="+id+err.Error())
+ result.Err = model.NewAppError("SqlPostStore.GetSingle", "store.sql_post.get.app_error", nil, "id="+id+err.Error(), http.StatusNotFound)
}
result.Data = &post