mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Optimize usage of cookie preferences
This commit is contained in:
parent
310c5e936d
commit
db45433ec4
13 changed files with 88 additions and 52 deletions
|
|
@ -17,8 +17,10 @@ proc findThemes*(dir: string): seq[string] =
|
|||
proc createPrefRouter*(cfg: Config) =
|
||||
router preferences:
|
||||
get "/settings":
|
||||
let html = renderPreferences(cookiePrefs(), refPath(), findThemes(cfg.staticDir))
|
||||
resp renderMain(html, request, cfg, "Preferences")
|
||||
let
|
||||
prefs = cookiePrefs()
|
||||
html = renderPreferences(prefs, refPath(), findThemes(cfg.staticDir))
|
||||
resp renderMain(html, request, cfg, prefs, "Preferences")
|
||||
|
||||
get "/settings/@i?":
|
||||
redirect("/settings")
|
||||
|
|
|
|||
Loading…
Reference in a new issue