summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-04-12 16:29:42 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2017-04-12 16:29:42 -0400
commit8b8aa2ca3c803b26fb4a1ba5f249111739376494 (patch)
tree9fa13e99e60a9effc12bad964b13a3c23fab795e /store/sql_user_store.go
parent03502cf73b8513a40877b1ac5726523974661d4d (diff)
downloadchat-8b8aa2ca3c803b26fb4a1ba5f249111739376494.tar.gz
chat-8b8aa2ca3c803b26fb4a1ba5f249111739376494.tar.bz2
chat-8b8aa2ca3c803b26fb4a1ba5f249111739376494.zip
Refactor OAuth 2.0 code into app layer (#6037)
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 52e45ed7d..5ea04155d 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -389,8 +389,7 @@ func (us SqlUserStore) Get(id string) StoreChannel {
if obj, err := us.GetReplica().Get(model.User{}, id); err != nil {
result.Err = model.NewLocAppError("SqlUserStore.Get", "store.sql_user.get.app_error", nil, "user_id="+id+", "+err.Error())
} else if obj == nil {
- result.Err = model.NewLocAppError("SqlUserStore.Get", MISSING_ACCOUNT_ERROR, nil, "user_id="+id)
- result.Err.StatusCode = http.StatusNotFound
+ result.Err = model.NewAppError("SqlUserStore.Get", MISSING_ACCOUNT_ERROR, nil, "user_id="+id, http.StatusNotFound)
} else {
result.Data = obj.(*model.User)
}