Whoopsie... Remark must be created first before remark->last_for()

This commit is contained in:
swagg boi 2022-10-08 22:50:44 -04:00
parent 0bea8118ba
commit ee9be4f855

View file

@ -29,11 +29,6 @@ sub create($self) {
$self->stash(status => 400) $self->stash(status => 400)
} }
else { else {
my $thread_url = $self->url_for(single_thread => {
thread_id => $thread_id,
thread_page => $self->remark->last_page_for($thread_id)
})->fragment('remarks');
$self->remark->create( $self->remark->create(
$thread_id, $thread_id,
$remark_author, $remark_author,
@ -44,7 +39,10 @@ sub create($self) {
$self->thread->bump($thread_id); $self->thread->bump($thread_id);
return $self->redirect_to($thread_url); return $self->redirect_to($self->url_for(single_thread => {
thread_id => $thread_id,
thread_page => $self->remark->last_page_for($thread_id)
})->fragment('remarks'));
} }
} }