1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Improve Response to be more idiomatic

This commit is contained in:
Frédéric Guillot 2017-11-21 18:30:16 -08:00
parent 25cbd65777
commit 02ff7b4bcf
25 changed files with 302 additions and 275 deletions

View file

@ -12,18 +12,18 @@ import (
func (c *Controller) ShowIcon(ctx *core.Context, request *core.Request, response *core.Response) {
iconID, err := request.IntegerParam("iconID")
if err != nil {
response.Html().BadRequest(err)
response.HTML().BadRequest(err)
return
}
icon, err := c.store.GetIconByID(iconID)
if err != nil {
response.Html().ServerError(err)
response.HTML().ServerError(err)
return
}
if icon == nil {
response.Html().NotFound()
response.HTML().NotFound()
return
}