lil cleanup

This commit is contained in:
swagg boi 2023-04-15 10:22:39 -04:00
parent 8591fe5610
commit 33e38e26f6
2 changed files with 7 additions and 6 deletions

View file

@ -168,8 +168,8 @@ sub create($self) {
else { else {
my ($name, $email, $password); my ($name, $email, $password);
$name = $self->param('name'); $name = $self->param('name' );
$email = $self->param('email'); $email = $self->param('email' );
$password = $self->param('password'); $password = $self->param('password');
$self->moderator->create($name, $email, $password); $self->moderator->create($name, $email, $password);

View file

@ -8,10 +8,11 @@ sub create($self, $name, $email, $password) {
my $password_hash = $self->authenticator->hash_password($password); my $password_hash = $self->authenticator->hash_password($password);
$self->pg->db->query(<<~'END_SQL', $name, $email, $password_hash); $self->pg->db->query(<<~'END_SQL', $name, $email, $password_hash);
INSERT INTO moderators INSERT INTO moderators (
(moderator_name, moderator_name,
email_addr, email_addr,
password_hash) password_hash
)
VALUES (?, ?, ?); VALUES (?, ?, ?);
END_SQL END_SQL
} }