nitter/src/routes/router_utils.nim

12 lines
342 B
Nim
Raw Normal View History

2019-09-20 23:08:30 +00:00
import ../utils, ../prefs
export utils, prefs
2019-09-20 13:03:18 +00:00
2019-09-06 00:42:35 +00:00
template cookiePrefs*(): untyped {.dirty.} =
2019-10-23 12:06:47 +00:00
getPrefs(request.cookies.getOrDefault("preferences"), cfg)
2019-09-06 00:42:35 +00:00
template getPath*(): untyped {.dirty.} =
$(parseUri(request.path) ? filterParams(request.params))
template refPath*(): untyped {.dirty.} =
if @"referer".len > 0: @"referer" else: "/"