From d6b5b681ae30d8d4a873e84728009218ddc59a20 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Mon, 25 Sep 2017 13:25:43 +0100 Subject: Finally do away with NewLocAppError function. (#7498) This cleans up the few NewLocAppError calls that crept in since the main bulk of them were removed, and finally removes the NewLocAppError function altogether. --- app/file.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/file.go') diff --git a/app/file.go b/app/file.go index 832ff77d4..36a23e3d8 100644 --- a/app/file.go +++ b/app/file.go @@ -309,8 +309,7 @@ func (a *App) DoUploadFile(now time.Time, teamId string, channelId string, userI if info.IsImage() { // Check dimensions before loading the whole thing into memory later on if info.Width*info.Height > MaxImageSize { - err := model.NewLocAppError("uploadFile", "api.file.upload_file.large_image.app_error", map[string]interface{}{"Filename": filename}, "") - err.StatusCode = http.StatusBadRequest + err := model.NewAppError("uploadFile", "api.file.upload_file.large_image.app_error", map[string]interface{}{"Filename": filename}, "", http.StatusBadRequest) return nil, err } -- cgit v1.2.3-1-g7c22