Misc. fixes and refactorings
This commit is contained in:
@@ -5,6 +5,7 @@ import jester
|
||||
import router_utils
|
||||
import ".."/[api, types, agents]
|
||||
import ../views/[embed]
|
||||
export getVideo
|
||||
|
||||
export embed
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import jester
|
||||
import router_utils
|
||||
import ".."/[query, types, api, agents]
|
||||
import ../views/[general, timeline, list]
|
||||
export getListTimeline, getListMembers
|
||||
|
||||
template respList*(list, timeline: typed) =
|
||||
if list.minId.len == 0:
|
||||
|
||||
@@ -13,6 +13,9 @@ const m3u8Regex* = re"""url="(.+.m3u8)""""
|
||||
|
||||
proc createMediaRouter*(cfg: Config) =
|
||||
router media:
|
||||
get "/pic/?":
|
||||
resp Http404
|
||||
|
||||
get "/pic/@url":
|
||||
cond "http" in @"url"
|
||||
cond "twimg" in @"url"
|
||||
|
||||
@@ -5,6 +5,7 @@ import jester
|
||||
import router_utils
|
||||
import ".."/[query, types, api, agents]
|
||||
import ../views/general
|
||||
export resolve
|
||||
|
||||
template respResolved*(url, kind: string): untyped =
|
||||
let u = url
|
||||
|
||||
@@ -87,8 +87,9 @@ proc createTimelineRouter*(cfg: Config) =
|
||||
setProfileCacheTime(cfg.profileCacheTime)
|
||||
|
||||
router timeline:
|
||||
get "/@name/?@tab?":
|
||||
get "/@name/?@tab?/?":
|
||||
cond '.' notin @"name"
|
||||
cond @"name" notin ["pic", "gif", "video"]
|
||||
cond @"tab" in ["with_replies", "media", "search", ""]
|
||||
let
|
||||
prefs = cookiePrefs()
|
||||
|
||||
Reference in New Issue
Block a user