1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-30 19:22:11 +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

@ -16,7 +16,7 @@ func (c *Controller) ShowHistoryPage(ctx *core.Context, request *core.Request, r
args, err := c.getCommonTemplateArgs(ctx)
if err != nil {
response.Html().ServerError(err)
response.HTML().ServerError(err)
return
}
@ -29,17 +29,17 @@ func (c *Controller) ShowHistoryPage(ctx *core.Context, request *core.Request, r
entries, err := builder.GetEntries()
if err != nil {
response.Html().ServerError(err)
response.HTML().ServerError(err)
return
}
count, err := builder.CountEntries()
if err != nil {
response.Html().ServerError(err)
response.HTML().ServerError(err)
return
}
response.Html().Render("history", args.Merge(tplParams{
response.HTML().Render("history", args.Merge(tplParams{
"entries": entries,
"total": count,
"pagination": c.getPagination(ctx.GetRoute("history"), count, offset),
@ -53,7 +53,7 @@ func (c *Controller) FlushHistory(ctx *core.Context, request *core.Request, resp
err := c.store.FlushHistory(user.ID)
if err != nil {
response.Html().ServerError(err)
response.HTML().ServerError(err)
return
}