1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +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

@ -20,7 +20,7 @@ func (c *Controller) ShowLoginPage(ctx *core.Context, request *core.Request, res
return
}
response.Html().Render("login", tplParams{
response.HTML().Render("login", tplParams{
"csrf": ctx.GetCsrfToken(),
})
}
@ -34,13 +34,13 @@ func (c *Controller) CheckLogin(ctx *core.Context, request *core.Request, respon
if err := authForm.Validate(); err != nil {
log.Println(err)
response.Html().Render("login", tplParams)
response.HTML().Render("login", tplParams)
return
}
if err := c.store.CheckPassword(authForm.Username, authForm.Password); err != nil {
log.Println(err)
response.Html().Render("login", tplParams)
response.HTML().Render("login", tplParams)
return
}
@ -50,7 +50,7 @@ func (c *Controller) CheckLogin(ctx *core.Context, request *core.Request, respon
realip.RealIP(request.Request()),
)
if err != nil {
response.Html().ServerError(err)
response.HTML().ServerError(err)
return
}