mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Use custom 404 page, halt on 404 instead of resp
This commit is contained in:
parent
8fcdfa744a
commit
ebb89edef6
7 changed files with 12 additions and 9 deletions
|
|
@ -19,10 +19,10 @@ proc createStatusRouter*(cfg: Config) =
|
|||
|
||||
let conversation = await getTweet(@"name", @"id", @"after", getAgent())
|
||||
if conversation == nil or conversation.tweet.id.len == 0:
|
||||
var error = "Tweet not found"
|
||||
if conversation != nil and conversation.tweet.tombstone.len > 0:
|
||||
resp Http404, showError(conversation.tweet.tombstone, cfg.title)
|
||||
else:
|
||||
resp Http404, showError("Tweet not found", cfg.title)
|
||||
error = conversation.tweet.tombstone
|
||||
halt Http404, showError(error, cfg.title)
|
||||
|
||||
let
|
||||
title = pageTitle(conversation.tweet.profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue