diff options
author | 2017-11-21 18:30:16 -0800 | |
---|---|---|
committer | 2017-11-21 18:30:16 -0800 | |
commit | 02ff7b4bcf2b2c691e55ae61fe97bfd9ae37658e (patch) | |
tree | 236d95c147453fcdeacd92cdc17fd886d664c1b0 /server/ui/controller/proxy.go | |
parent | 25cbd657771a67ef41abac4089a231369b96276e (diff) | |
download | v2-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.go | 8 |
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 } |