From bf20cd68f007469b6b0f66f5b2546ebd1d2b2e09 Mon Sep 17 00:00:00 2001 From: swag Date: Sun, 4 Jun 2023 13:46:21 -0400 Subject: [PATCH] Make status more accurate for these errors --- lib/PostText/Controller/Moderator.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PostText/Controller/Moderator.pm b/lib/PostText/Controller/Moderator.pm index 16cecb8..1d8891d 100644 --- a/lib/PostText/Controller/Moderator.pm +++ b/lib/PostText/Controller/Moderator.pm @@ -272,7 +272,7 @@ sub promote($self) { $v->required('email')->size(6, 320); if ($v->has_error) { - $self->stash(status => 404) + $self->stash(status => 400) } else { my $email = $v->param('email'); @@ -294,7 +294,7 @@ sub demote($self) { $v->required('email')->size(6, 320); if ($v->has_error) { - $self->stash(status => 404) + $self->stash(status => 400) } else { my $email = $v->param('email');