Set the HTTP status correctly via the new API.
This commit is contained in:
parent
38d35e23b6
commit
9a4703eca0
1 changed files with 1 additions and 1 deletions
|
|
@ -3012,7 +3012,7 @@ sub www_editThingDataSaveViaAjax {
|
||||||
return JSON->new->encode({message => $i18n->get("has entered max per user message")});
|
return JSON->new->encode({message => $i18n->get("has entered max per user message")});
|
||||||
}
|
}
|
||||||
if($thingDataId eq 'new' && $self->hasEnteredMaxEntries($thingId)){
|
if($thingDataId eq 'new' && $self->hasEnteredMaxEntries($thingId)){
|
||||||
$session->http->setStatus("400", "Bad Request");
|
$session->response->status("400");
|
||||||
return JSON->new->encode({message => $i18n->get("has entered max total message")});
|
return JSON->new->encode({message => $i18n->get("has entered max total message")});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue