mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Rework list api
This commit is contained in:
parent
51c6605d3f
commit
35bb5f9132
7 changed files with 38 additions and 36 deletions
|
|
@ -119,19 +119,18 @@ proc createRssRouter*(cfg: Config) =
|
|||
await cacheRss(key, rss)
|
||||
respRss(rss)
|
||||
|
||||
get "/@name/lists/@list/rss":
|
||||
get "/i/lists/@id/rss":
|
||||
cond cfg.enableRss
|
||||
cond '.' notin @"name"
|
||||
let
|
||||
cursor = getCursor()
|
||||
key = @"name" & "/" & @"list" & cursor
|
||||
key = @"id" & cursor
|
||||
|
||||
var rss = await getCachedRss(key)
|
||||
if rss.cursor.len > 0:
|
||||
respRss(rss)
|
||||
|
||||
let
|
||||
list = await getCachedList(@"name", @"list")
|
||||
list = await getCachedList(id=(@"id"))
|
||||
timeline = await getListTimeline(list.id, cursor)
|
||||
rss.cursor = timeline.bottom
|
||||
rss.feed = compress renderListRss(timeline.content, list, cfg)
|
||||
|
|
|
|||
Loading…
Reference in a new issue