mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Move UI middlewares and routes to ui package
This commit is contained in:
parent
0925899cee
commit
5a69a61d48
70 changed files with 739 additions and 769 deletions
|
@ -13,13 +13,12 @@ import (
|
|||
"miniflux.app/logger"
|
||||
)
|
||||
|
||||
// RemoveSession remove a user session.
|
||||
func (c *Controller) RemoveSession(w http.ResponseWriter, r *http.Request) {
|
||||
func (h *handler) removeSession(w http.ResponseWriter, r *http.Request) {
|
||||
sessionID := request.RouteInt64Param(r, "sessionID")
|
||||
err := c.store.RemoveUserSessionByID(request.UserID(r), sessionID)
|
||||
err := h.store.RemoveUserSessionByID(request.UserID(r), sessionID)
|
||||
if err != nil {
|
||||
logger.Error("[Controller:RemoveSession] %v", err)
|
||||
}
|
||||
|
||||
html.Redirect(w, r, route.Path(c.router, "sessions"))
|
||||
html.Redirect(w, r, route.Path(h.router, "sessions"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue