Throw some 404s
This commit is contained in:
parent
8473f2f2d9
commit
f5637f65e7
@ -151,6 +151,9 @@ group {
|
|||||||
my $remarks =
|
my $remarks =
|
||||||
$c->remark->get_remarks_by_thread_id($thread_id, $this_page);
|
$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'}) {
|
if (my $thread_body = %$thread{'body'}) {
|
||||||
$c->stash(
|
$c->stash(
|
||||||
thread => $thread,
|
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();
|
$c->render();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -28,4 +28,3 @@ Run the tests locally (against development environment)
|
|||||||
1. Return the last remark with remark form
|
1. Return the last remark with remark form
|
||||||
1. Marked some items for clean up with comments
|
1. Marked some items for clean up with comments
|
||||||
1. Method names may need to be shortened
|
1. Method names may need to be shortened
|
||||||
1. Probably throw a 404 if you request a remark page that doesn't exist
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user