Migrate all the api4 to handle errors in idiomatic way (#9143)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1f168263a2
Коммит
d81a61398d
@@ -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)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user