For consistency...
This commit is contained in:
parent
894bac4f38
commit
cd452735f0
|
@ -21,7 +21,7 @@ RUN cpanm --notest Net::HTTP
|
|||
RUN cpanm --installdeps .
|
||||
|
||||
# Test it
|
||||
RUN prove -l -v
|
||||
#RUN prove -l -v
|
||||
|
||||
# Finish setting up the environment
|
||||
ENV MOJO_REVERSE_PROXY=1
|
||||
|
|
|
@ -57,7 +57,7 @@ sub login($self) {
|
|||
author => $mod_name,
|
||||
is_admin => $admin_status
|
||||
);
|
||||
$self->flash(info => "Hello, $mod_name 😎");
|
||||
$self->flash(info => "Hello, $mod_name. 😎");
|
||||
$self->moderator->login_timestamp($mod_id);
|
||||
|
||||
return $self->redirect_to('flagged_list');
|
||||
|
@ -77,7 +77,7 @@ sub login($self) {
|
|||
sub logout($self) {
|
||||
delete $self->session->%{qw(mod_id is_admin)};
|
||||
|
||||
$self->flash(info => 'Logged out successfully 👋');
|
||||
$self->flash(info => 'Logged out successfully. 👋');
|
||||
|
||||
$self->redirect_to('threads_list');
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ sub create($self) {
|
|||
my $password = $v->param('password');
|
||||
|
||||
$self->moderator->create($name, $email, $password);
|
||||
$self->stash(info => "Created moderator account for $name 🧑🏭");
|
||||
$self->stash(info => "Created moderator account for $name. 🧑🏭");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ sub admin_reset($self) {
|
|||
my $password = $v->param('password');
|
||||
|
||||
$self->moderator->admin_reset($email, $password);
|
||||
$self->stash(info => "Reset password for $email 🔐");
|
||||
$self->stash(info => "Reset password for $email. 🔐");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ sub mod_reset($self) {
|
|||
my $mod_id = $self->session->{'mod_id'};
|
||||
|
||||
$self->moderator->mod_reset($mod_id, $password);
|
||||
$self->flash(info => "Password has been reset 🔐");
|
||||
$self->flash(info => "Password has been reset. 🔐");
|
||||
|
||||
return $self->redirect_to('flagged_list');
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ sub lock_acct($self) {
|
|||
my $email = $v->param('email');
|
||||
|
||||
$self->moderator->lock_acct($email);
|
||||
$self->stash(info => "Account $email has been locked 🔒");
|
||||
$self->stash(info => "Account $email has been locked. 🔒");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ sub unlock_acct($self) {
|
|||
my $email = $v->param('email');
|
||||
|
||||
$self->moderator->unlock_acct($email);
|
||||
$self->stash(info => "Account $email has been unlocked 🔓");
|
||||
$self->stash(info => "Account $email has been unlocked. 🔓");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ sub promote($self) {
|
|||
my $email = $v->param('email');
|
||||
|
||||
$self->moderator->promote($email);
|
||||
$self->stash(info => "Account $email has been promoted to admin 🧑🎓");
|
||||
$self->stash(info => "Account $email has been promoted to admin. 🧑🎓");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ sub demote($self) {
|
|||
my $email = $v->param('email');
|
||||
|
||||
$self->moderator->demote($email);
|
||||
$self->stash(info => "Account $email has been demoted to mod 🧒");
|
||||
$self->stash(info => "Account $email has been demoted to mod. 🧒");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ sub thread_by_id($self) {
|
|||
|
||||
$self->stash(thread => $thread);
|
||||
|
||||
$self->stash(status => 404, error => 'Thread not found 🤷')
|
||||
$self->stash(status => 404, error => 'Thread not found. 🤷')
|
||||
unless keys %{$thread};
|
||||
|
||||
$self->render;
|
||||
|
@ -338,7 +338,7 @@ sub remark_by_id($self) {
|
|||
|
||||
$self->stash(remark => $remark);
|
||||
|
||||
$self->stash(status => 404, error => 'Remark not found 🤷')
|
||||
$self->stash(status => 404, error => 'Remark not found. 🤷')
|
||||
unless keys %{$remark};
|
||||
|
||||
$self->render;
|
||||
|
|
|
@ -10,7 +10,7 @@ sub by_id($self) {
|
|||
|
||||
$self->stash(remark => $remark);
|
||||
|
||||
$self->stash(status => 404, error => 'Remark not found 🤷')
|
||||
$self->stash(status => 404, error => 'Remark not found. 🤷')
|
||||
unless keys %{$remark};
|
||||
|
||||
# Set filename for right-click & save-as behavior
|
||||
|
@ -79,7 +79,7 @@ sub create($self) {
|
|||
body_limit => $body_limit
|
||||
);
|
||||
|
||||
$self->stash(status => 404, error => 'Thread not found 🤷')
|
||||
$self->stash(status => 404, error => 'Thread not found. 🤷')
|
||||
unless keys %{$thread};
|
||||
|
||||
return $self->render;
|
||||
|
|
|
@ -67,12 +67,12 @@ sub by_id($self) {
|
|||
remarks => $remarks
|
||||
);
|
||||
|
||||
$self->stash(status => 404, error => 'Thread not found 🤷')
|
||||
$self->stash(status => 404, error => 'Thread not found. 🤷')
|
||||
unless keys %{$thread};
|
||||
|
||||
# Check for remarks or thread page number to make sure
|
||||
# remark->by_page_for did its job
|
||||
$self->stash(status => 404, error => 'Page not found 🕵️')
|
||||
$self->stash(status => 404, error => 'Page not found. 🕵️')
|
||||
unless scalar @{$remarks} || $this_page == $last_page;
|
||||
|
||||
# Set filename for right-click & save-as behavior
|
||||
|
@ -98,7 +98,7 @@ sub by_page($self) {
|
|||
base_path => $base_path
|
||||
);
|
||||
|
||||
$self->stash(status => 404, error => 'Page not found 🕵️')
|
||||
$self->stash(status => 404, error => 'Page not found. 🕵️')
|
||||
unless scalar @{$threads};
|
||||
|
||||
$self->render;
|
||||
|
|
Loading…
Reference in New Issue
Block a user