Add helper for the new model

This commit is contained in:
swagg boi 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 # Load the model
use lib 'lib'; use lib 'lib';
use GuestbookNg::Model::Message; use GuestbookNg::Model::Message;
use GuestbookNg::Model::Counter;
# Plugins # Plugins
plugin 'Config'; plugin 'Config';
@ -29,6 +30,10 @@ helper message => sub {
state $message = GuestbookNg::Model::Message->new(pg => shift->pg) state $message = GuestbookNg::Model::Message->new(pg => shift->pg)
}; };
helper counter => sub {
state $counter = GuestbookNg::Model::Counter->new(pg => shift->pg)
};
# Routes # Routes
under sub ($c) { under sub ($c) {
# Opt out of Google FLoC # Opt out of Google FLoC