summaryrefslogtreecommitdiffstats
path: root/api4/image.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-08-01 16:55:18 +0200
committerGitHub <noreply@github.com>2018-08-01 16:55:18 +0200
commitd81a61398d01d839e70e2345da787e7ef89c0832 (patch)
treea0702c7874ae31b487bb0b87dcce613edc1e53b9 /api4/image.go
parent1f168263a2ff73ddee1193cccdeea533f6d501fe (diff)
downloadchat-d81a61398d01d839e70e2345da787e7ef89c0832.tar.gz
chat-d81a61398d01d839e70e2345da787e7ef89c0832.tar.bz2
chat-d81a61398d01d839e70e2345da787e7ef89c0832.zip
Migrate all the api4 to handle errors in idiomatic way (#9143)
Diffstat (limited to 'api4/image.go')
-rw-r--r--api4/image.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/api4/image.go b/api4/image.go
index 4589de204..99065a8c7 100644
--- a/api4/image.go
+++ b/api4/image.go
@@ -16,7 +16,8 @@ func getImage(c *Context, w http.ResponseWriter, r *http.Request) {
// security reasons.
if transform := c.App.ImageProxyAdder(); transform != nil {
http.Redirect(w, r, transform(r.URL.Query().Get("url")), http.StatusFound)
- } else {
- http.NotFound(w, r)
+ return
}
+
+ http.NotFound(w, r)
}