Move this to somewhat organize

This commit is contained in:
swag 2023-01-09 19:50:54 -05:00
parent c34b07c129
commit b685388289
2 changed files with 9 additions and 8 deletions

View File

@ -33,6 +33,7 @@ Run the tests locally (against development environment):
## TODOs ## TODOs
1. Actions for creating moderators and resetting passwords 1. Actions for creating moderators and resetting passwords
1. Probably tests for that 'hidden' button
1. CSS 1. CSS
1. "All new posts flagged" mode (require approval for new posts) 1. "All new posts flagged" mode (require approval for new posts)

View File

@ -53,14 +53,6 @@ sub unlock($self, $mod_id) {
END_SQL END_SQL
} }
sub admin_status($self, $mod_id) {
$self->pg->db->query(<<~'END_SQL', $mod_id)->hash->{'admin_status'}
SELECT admin_status
FROM moderators
WHERE moderator_id = ?;
END_SQL
}
sub get_id($self, $email) { sub get_id($self, $email) {
$self->pg->db->query(<<~'END_SQL', $email)->hash->{'moderator_id'} $self->pg->db->query(<<~'END_SQL', $email)->hash->{'moderator_id'}
SELECT moderator_id SELECT moderator_id
@ -77,6 +69,14 @@ sub get_name($self, $mod_id) {
END_SQL END_SQL
} }
sub admin_status($self, $mod_id) {
$self->pg->db->query(<<~'END_SQL', $mod_id)->hash->{'admin_status'}
SELECT admin_status
FROM moderators
WHERE moderator_id = ?;
END_SQL
}
sub lock_status($self, $mod_id) { sub lock_status($self, $mod_id) {
$self->pg->db->query(<<~'END_SQL', $mod_id)->hash->{'lock_status'} $self->pg->db->query(<<~'END_SQL', $mod_id)->hash->{'lock_status'}
SELECT lock_status SELECT lock_status