Fix trailing slash routing error

Fixes #146
This commit is contained in:
Zed 2020-04-29 15:09:51 +02:00
parent feb939d918
commit 92b3ba057d

View file

@ -13,7 +13,7 @@ export status
proc createStatusRouter*(cfg: Config) =
router status:
get "/@name/status/@id":
get "/@name/status/@id/?":
cond '.' notin @"name"
let prefs = cookiePrefs()
@ -47,7 +47,7 @@ proc createStatusRouter*(cfg: Config) =
cond @"m" in ["video", "photo"]
redirect("/$1/status/$2" % [@"name", @"id"])
get "/@name/statuses/@id":
get "/@name/statuses/@id/?":
redirect("/$1/status/$2" % [@"name", @"id"])
get "/i/web/status/@id":