Make status more accurate for these errors
This commit is contained in:
parent
a332ea1584
commit
bf20cd68f0
|
@ -272,7 +272,7 @@ sub promote($self) {
|
||||||
$v->required('email')->size(6, 320);
|
$v->required('email')->size(6, 320);
|
||||||
|
|
||||||
if ($v->has_error) {
|
if ($v->has_error) {
|
||||||
$self->stash(status => 404)
|
$self->stash(status => 400)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $email = $v->param('email');
|
my $email = $v->param('email');
|
||||||
|
@ -294,7 +294,7 @@ sub demote($self) {
|
||||||
$v->required('email')->size(6, 320);
|
$v->required('email')->size(6, 320);
|
||||||
|
|
||||||
if ($v->has_error) {
|
if ($v->has_error) {
|
||||||
$self->stash(status => 404)
|
$self->stash(status => 400)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $email = $v->param('email');
|
my $email = $v->param('email');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user