parent
397471f8f4
commit
fddf1d510a
|
@ -44,3 +44,10 @@ proc createPrefRouter*(cfg: Config) =
|
||||||
cache(prefs)
|
cache(prefs)
|
||||||
savePrefs()
|
savePrefs()
|
||||||
redirect(refPath())
|
redirect(refPath())
|
||||||
|
|
||||||
|
before:
|
||||||
|
if @"theme".len > 0:
|
||||||
|
var prefs = cookiePrefs()
|
||||||
|
prefs.theme = @"theme".capitalizeAscii.replace("_", " ")
|
||||||
|
cache(prefs)
|
||||||
|
savePrefs()
|
||||||
|
|
|
@ -47,8 +47,7 @@ proc fetchMultiTimeline*(names: seq[string]; after, agent: string; query: Query;
|
||||||
return await getSearch[Tweet](q, after, agent, media)
|
return await getSearch[Tweet](q, after, agent, media)
|
||||||
|
|
||||||
proc get*(req: Request; key: string): string =
|
proc get*(req: Request; key: string): string =
|
||||||
if key in params(req): params(req)[key]
|
params(req).getOrDefault(key)
|
||||||
else: ""
|
|
||||||
|
|
||||||
proc showTimeline*(request: Request; query: Query; cfg: Config; rss: string): Future[string] {.async.} =
|
proc showTimeline*(request: Request; query: Query; cfg: Config; rss: string): Future[string] {.async.} =
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in New Issue