Add helper for the new model

This commit is contained in:
swag 2022-02-09 21:17:49 -05:00
parent 01ca269dd3
commit 54aa04d04c

View File

@ -13,6 +13,7 @@ use Number::Format qw{format_number};
# Load the model
use lib 'lib';
use GuestbookNg::Model::Message;
use GuestbookNg::Model::Counter;
# Plugins
plugin 'Config';
@ -29,6 +30,10 @@ helper message => sub {
state $message = GuestbookNg::Model::Message->new(pg => shift->pg)
};
helper counter => sub {
state $counter = GuestbookNg::Model::Counter->new(pg => shift->pg)
};
# Routes
under sub ($c) {
# Opt out of Google FLoC