diff --git a/README.md b/README.md index 7e03205..1f415ec 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Run the tests locally (against development environment): ## TODOs 1. Actions for creating moderators and resetting passwords +1. Tests for Moderator 1. CSS ## Crazy future ideas diff --git a/lib/PostText/Model/Moderator.pm b/lib/PostText/Model/Moderator.pm index 20b056c..7783c8e 100644 --- a/lib/PostText/Model/Moderator.pm +++ b/lib/PostText/Model/Moderator.pm @@ -2,8 +2,7 @@ package PostText::Model::Moderator; use Mojo::Base -base, -signatures; -has 'pg'; -has 'authenticator'; +has [qw{pg authenticator}]; sub check($self, $email, $password) { my $moderator = diff --git a/lib/PostText/Model/Remark.pm b/lib/PostText/Model/Remark.pm index 4bd49d1..0f3d095 100644 --- a/lib/PostText/Model/Remark.pm +++ b/lib/PostText/Model/Remark.pm @@ -4,7 +4,7 @@ use Mojo::Base -base, -signatures; has 'pg'; -has per_page => sub { 5 }; +has per_page => 5; sub by_page_for($self, $thread_id, $this_page = 1) { my $date_format = $self->{'date_format'}; diff --git a/lib/PostText/Model/Thread.pm b/lib/PostText/Model/Thread.pm index 3d83a93..db33d6e 100644 --- a/lib/PostText/Model/Thread.pm +++ b/lib/PostText/Model/Thread.pm @@ -4,7 +4,7 @@ use Mojo::Base -base, -signatures; has 'pg'; -has per_page => sub { 5 }; +has per_page => 5; sub create($self, $author, $title, $body, $hidden = 0, $flagged = 0) { my @data = ($author, $title, $body, $hidden, $flagged);