Fix post count

This commit is contained in:
swagg boi 2022-01-11 20:15:53 -05:00
parent 53f292ac7c
commit 02b087a38e

View file

@ -39,6 +39,8 @@ under sub ($c) {
$c->stash(status => 403) if $c->flash('error'); $c->stash(status => 403) if $c->flash('error');
$c->stash(post_count => format_number $c->message->get_post_count);
1; 1;
}; };
@ -46,13 +48,11 @@ get '/' => sub ($c) {
my $this_page = $c->param('page') || 1; my $this_page = $c->param('page') || 1;
my $last_page = $c->message->get_last_page(); my $last_page = $c->message->get_last_page();
my $view_posts = $c->message->get_posts($this_page); my $view_posts = $c->message->get_posts($this_page);
my $post_count = format_number $c->message->get_post_count();
$c->stash( $c->stash(
view_posts => $view_posts, view_posts => $view_posts,
this_page => $this_page, this_page => $this_page,
last_page => $last_page, last_page => $last_page
post_count => $post_count
); );
$c->render(); $c->render();