Handle 404 stuff better for thread.by_id

This commit is contained in:
swagg boi 2023-05-14 16:17:10 -04:00
parent bda544feda
commit 061ee919a7
2 changed files with 6 additions and 2 deletions

View file

@ -62,7 +62,8 @@ sub by_id($self) {
}
else {
$self->stash(
thread => [],
thread => {},
remarks => [],
status => 404
)
}

View file

@ -36,6 +36,9 @@ subtest 'View single thread', sub {
$t->get_ok('/thread/single/1/1')->status_is(200)
->text_like(h2 => qr/Thread #1/);
$t->get_ok('/thread/single/65536')->status_is(404)
->text_like(h2 => qr/Thread #/);
};
subtest 'Threads feed', sub {