aboutsummaryrefslogtreecommitdiff
path: root/server/ui/controller/proxy.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net> 2017-11-21 18:30:16 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net> 2017-11-21 18:30:16 -0800
commit02ff7b4bcf2b2c691e55ae61fe97bfd9ae37658e (patch)
tree236d95c147453fcdeacd92cdc17fd886d664c1b0 /server/ui/controller/proxy.go
parent25cbd657771a67ef41abac4089a231369b96276e (diff)
downloadv2-02ff7b4bcf2b2c691e55ae61fe97bfd9ae37658e.tar.gz
v2-02ff7b4bcf2b2c691e55ae61fe97bfd9ae37658e.tar.zst
v2-02ff7b4bcf2b2c691e55ae61fe97bfd9ae37658e.zip
Improve Response to be more idiomatic
Diffstat (limited to 'server/ui/controller/proxy.go')
-rw-r--r--server/ui/controller/proxy.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/ui/controller/proxy.go b/server/ui/controller/proxy.go
index 95e039a4..19a64366 100644
--- a/server/ui/controller/proxy.go
+++ b/server/ui/controller/proxy.go
@@ -18,26 +18,26 @@ import (
func (c *Controller) ImageProxy(ctx *core.Context, request *core.Request, response *core.Response) {
encodedURL := request.StringParam("encodedURL", "")
if encodedURL == "" {
- response.Html().BadRequest(errors.New("No URL provided"))
+ response.HTML().BadRequest(errors.New("No URL provided"))
return
}
decodedURL, err := base64.StdEncoding.DecodeString(encodedURL)
if err != nil {
- response.Html().BadRequest(errors.New("Unable to decode this URL"))
+ response.HTML().BadRequest(errors.New("Unable to decode this URL"))
return
}
resp, err := http.Get(string(decodedURL))
if err != nil {
log.Println(err)
- response.Html().NotFound()
+ response.HTML().NotFound()
return
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- response.Html().NotFound()
+ response.HTML().NotFound()
return
}