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

Ignore trailing slashes for list routes

This commit is contained in:
Zed
2020-06-01 05:31:11 +02:00
parent 92883cbd73
commit 1cb57401b6
2 changed files with 8 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ template respList*(list, timeline, vnode: typed) =
proc createListRouter*(cfg: Config) =
router list:
get "/@name/lists/@list":
get "/@name/lists/@list/?":
cond '.' notin @"name"
cond @"name" != "i"
let
@@ -36,7 +36,7 @@ proc createListRouter*(cfg: Config) =
members = await getListMembers(list)
respList(list, members, renderTimelineUsers(members, cookiePrefs(), request.path))
get "/i/lists/@id":
get "/i/lists/@id/?":
cond '.' notin @"id"
let list = await getCachedList(id=(@"id"))
if list.id.len == 0: