diff options
author | George Goldberg <george@gberg.me> | 2017-08-31 15:03:16 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-08-31 10:03:16 -0400 |
commit | 63b10be020deffecba0c5eef8e5872418215b464 (patch) | |
tree | 192c061ba8abc8c07b4241fa1d186c0152f8267a /api4/reaction.go | |
parent | b37e17c03259b592e0bc735d48d15d7cf34469e4 (diff) | |
download | chat-63b10be020deffecba0c5eef8e5872418215b464.tar.gz chat-63b10be020deffecba0c5eef8e5872418215b464.tar.bz2 chat-63b10be020deffecba0c5eef8e5872418215b464.zip |
APIv4: NewLocAppError -> NewAppError (#7328)
Diffstat (limited to 'api4/reaction.go')
-rw-r--r-- | api4/reaction.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/api4/reaction.go b/api4/reaction.go index 6605eb070..7f161d7fe 100644 --- a/api4/reaction.go +++ b/api4/reaction.go @@ -28,14 +28,12 @@ func saveReaction(c *Context, w http.ResponseWriter, r *http.Request) { } if len(reaction.UserId) != 26 || len(reaction.PostId) != 26 || len(reaction.EmojiName) == 0 || len(reaction.EmojiName) > 64 { - c.Err = model.NewLocAppError("saveReaction", "api.reaction.save_reaction.invalid.app_error", nil, "") - c.Err.StatusCode = http.StatusBadRequest + c.Err = model.NewAppError("saveReaction", "api.reaction.save_reaction.invalid.app_error", nil, "", http.StatusBadRequest) return } if reaction.UserId != c.Session.UserId { - c.Err = model.NewLocAppError("saveReaction", "api.reaction.save_reaction.user_id.app_error", nil, "") - c.Err.StatusCode = http.StatusForbidden + c.Err = model.NewAppError("saveReaction", "api.reaction.save_reaction.user_id.app_error", nil, "", http.StatusForbidden) return } |