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

@@ -15,7 +15,7 @@ proc showRss*(name: string; query: Query): Future[string] {.async.} =
template respRss*(rss: typed) =
if rss.len == 0:
resp Http404, showError("User \"" & @"name" & "\" not found", cfg.title)
halt Http404, showError("User \"" & @"name" & "\" not found", cfg.title)
resp rss, "application/rss+xml;charset=utf-8"
proc createRssRouter*(cfg: Config) =