Throw some 404s

This commit is contained in:
swaggboi 2022-08-24 16:19:37 -04:00
parent 8473f2f2d9
commit f5637f65e7
2 changed files with 6 additions and 1 deletions

View File

@ -151,6 +151,9 @@ group {
my $remarks =
$c->remark->get_remarks_by_thread_id($thread_id, $this_page);
# Probably a better way to do this 404 stuff I reckon
# Check for existence of thread
if (my $thread_body = %$thread{'body'}) {
$c->stash(
thread => $thread,
@ -167,6 +170,9 @@ group {
)
}
# Check for existance of remark page number
$c->stash(status => 404) unless $remarks->[0] || 1 >= $this_page;
$c->render();
};
};

View File

@ -28,4 +28,3 @@ Run the tests locally (against development environment)
1. Return the last remark with remark form
1. Marked some items for clean up with comments
1. Method names may need to be shortened
1. Probably throw a 404 if you request a remark page that doesn't exist