diff options
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_post_store.go | 4 |
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 |