mirror of
https://github.com/zedeus/nitter.git
synced 2025-12-10 05:55:37 -05:00
Refactor list routes
This commit is contained in:
@@ -17,14 +17,10 @@ proc createListRouter*(cfg: Config) =
|
|||||||
router list:
|
router list:
|
||||||
get "/@name/lists/@list":
|
get "/@name/lists/@list":
|
||||||
cond '.' notin @"name"
|
cond '.' notin @"name"
|
||||||
let
|
let list = await getListTimeline(@"name", @"list", @"max_position", getAgent())
|
||||||
list = await getListTimeline(@"name", @"list", @"max_position", getAgent())
|
respList list, renderTimelineTweets(list, cookiePrefs(), request.path)
|
||||||
tweets = renderTimelineTweets(list, cookiePrefs(), request.path)
|
|
||||||
respList list, tweets
|
|
||||||
|
|
||||||
get "/@name/lists/@list/members":
|
get "/@name/lists/@list/members":
|
||||||
cond '.' notin @"name"
|
cond '.' notin @"name"
|
||||||
let
|
let list = await getListMembers(@"name", @"list", @"max_position", getAgent())
|
||||||
list = await getListMembers(@"name", @"list", @"max_position", getAgent())
|
respList list, renderTimelineUsers(list, cookiePrefs(), request.path)
|
||||||
users = renderTimelineUsers(list, cookiePrefs(), request.path)
|
|
||||||
respList list, users
|
|
||||||
|
|||||||
Reference in New Issue
Block a user