1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-10 05:55:37 -05:00

Use custom 404 page, halt on 404 instead of resp

This commit is contained in:
Zed
2019-10-07 16:47:53 +02:00
parent 8fcdfa744a
commit ebb89edef6
7 changed files with 12 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ proc createSearchRouter*(cfg: Config) =
resp renderMain(renderTweetSearch(tweets, prefs, getPath()), request,
cfg.title, rss=rss)
else:
resp Http404, showError("Invalid search.", cfg.title)
halt Http404, showError("Invalid search", cfg.title)
get "/hashtag/@hash":
redirect("/search?q=" & encodeUrl("#" & @"hash"))