1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-07 20:45:36 -05:00

Refactoring

This commit is contained in:
Zed
2019-10-23 09:03:15 +02:00
parent ffce6e21ab
commit 5979d7f588
5 changed files with 35 additions and 37 deletions

View File

@@ -18,17 +18,13 @@ proc createListRouter*(cfg: Config) =
get "/@name/lists/@list":
cond '.' notin @"name"
let
list = await getListTimeline(@"name", @"list", getAgent(), @"max_position")
list = await getListTimeline(@"name", @"list", @"max_position", getAgent())
tweets = renderTimelineTweets(list, cookiePrefs(), request.path)
respList list, tweets
get "/@name/lists/@list/members":
cond '.' notin @"name"
let list =
if @"max_position".len == 0:
await getListMembers(@"name", @"list", getAgent())
else:
await getListMembersSearch(@"name", @"list", getAgent(), @"max_position")
let users = renderTimelineUsers(list, cookiePrefs(), request.path)
let
list = await getListMembers(@"name", @"list", @"max_position", getAgent())
users = renderTimelineUsers(list, cookiePrefs(), request.path)
respList list, users