mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Improve Request to be more idiomatic
This commit is contained in:
parent
4fc18647ca
commit
25cbd65777
20 changed files with 80 additions and 77 deletions
|
@ -23,7 +23,7 @@ func (c *Controller) ShowSessions(ctx *core.Context, request *core.Request, resp
|
|||
return
|
||||
}
|
||||
|
||||
sessionCookie := request.GetCookie("sessionID")
|
||||
sessionCookie := request.Cookie("sessionID")
|
||||
response.Html().Render("sessions", args.Merge(tplParams{
|
||||
"sessions": sessions,
|
||||
"currentSessionToken": sessionCookie,
|
||||
|
@ -34,7 +34,7 @@ func (c *Controller) ShowSessions(ctx *core.Context, request *core.Request, resp
|
|||
func (c *Controller) RemoveSession(ctx *core.Context, request *core.Request, response *core.Response) {
|
||||
user := ctx.GetLoggedUser()
|
||||
|
||||
sessionID, err := request.GetIntegerParam("sessionID")
|
||||
sessionID, err := request.IntegerParam("sessionID")
|
||||
if err != nil {
|
||||
response.Html().BadRequest(err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue