From 63b10be020deffecba0c5eef8e5872418215b464 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Thu, 31 Aug 2017 15:03:16 +0100 Subject: APIv4: NewLocAppError -> NewAppError (#7328) --- api4/channel.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'api4/channel.go') diff --git a/api4/channel.go b/api4/channel.go index 8e9a6d9d6..8a14b85bb 100644 --- a/api4/channel.go +++ b/api4/channel.go @@ -106,15 +106,13 @@ func updateChannel(c *Context, w http.ResponseWriter, r *http.Request) { } if oldChannel.DeleteAt > 0 { - c.Err = model.NewLocAppError("updateChannel", "api.channel.update_channel.deleted.app_error", nil, "") - c.Err.StatusCode = http.StatusBadRequest + c.Err = model.NewAppError("updateChannel", "api.channel.update_channel.deleted.app_error", nil, "", http.StatusBadRequest) return } if oldChannel.Name == model.DEFAULT_CHANNEL { if (len(channel.Name) > 0 && channel.Name != oldChannel.Name) || (len(channel.Type) > 0 && channel.Type != oldChannel.Type) { - c.Err = model.NewLocAppError("updateChannel", "api.channel.update_channel.tried.app_error", map[string]interface{}{"Channel": model.DEFAULT_CHANNEL}, "") - c.Err.StatusCode = http.StatusBadRequest + c.Err = model.NewAppError("updateChannel", "api.channel.update_channel.tried.app_error", map[string]interface{}{"Channel": model.DEFAULT_CHANNEL}, "", http.StatusBadRequest) return } } -- cgit v1.2.3-1-g7c22