From 33e38e26f64b336e04cc76863fbd030252379045 Mon Sep 17 00:00:00 2001 From: swag Date: Sat, 15 Apr 2023 10:22:39 -0400 Subject: [PATCH] lil cleanup --- lib/PostText/Controller/Moderator.pm | 4 ++-- lib/PostText/Model/Moderator.pm | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/PostText/Controller/Moderator.pm b/lib/PostText/Controller/Moderator.pm index d921124..e566729 100644 --- a/lib/PostText/Controller/Moderator.pm +++ b/lib/PostText/Controller/Moderator.pm @@ -168,8 +168,8 @@ sub create($self) { else { my ($name, $email, $password); - $name = $self->param('name'); - $email = $self->param('email'); + $name = $self->param('name' ); + $email = $self->param('email' ); $password = $self->param('password'); $self->moderator->create($name, $email, $password); diff --git a/lib/PostText/Model/Moderator.pm b/lib/PostText/Model/Moderator.pm index aac7c44..3b34c71 100644 --- a/lib/PostText/Model/Moderator.pm +++ b/lib/PostText/Model/Moderator.pm @@ -8,10 +8,11 @@ sub create($self, $name, $email, $password) { my $password_hash = $self->authenticator->hash_password($password); $self->pg->db->query(<<~'END_SQL', $name, $email, $password_hash); - INSERT INTO moderators - (moderator_name, - email_addr, - password_hash) + INSERT INTO moderators ( + moderator_name, + email_addr, + password_hash + ) VALUES (?, ?, ?); END_SQL }