mirror of
https://github.com/Karaka-Management/oms-OnlineResourceWatcher.git
synced 2026-02-13 14:48:41 +00:00
fix default respone generation
This commit is contained in:
parent
f01ee5e7de
commit
0989aaa5e7
|
|
@ -158,8 +158,8 @@ final class ApiController extends Controller
|
||||||
public function apiResourceCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiResourceCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateResourceCreate($request))) {
|
if (!empty($val = $this->validateResourceCreate($request))) {
|
||||||
$response->data['resource_create'] = new FormValidation($val);
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$this->createInvalidCreateResponse($request, $response, $val);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -877,8 +877,8 @@ final class ApiController extends Controller
|
||||||
public function apiInformCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiInformCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateInformCreate($request))) {
|
if (!empty($val = $this->validateInformCreate($request))) {
|
||||||
$response->data['resource_inform_create'] = new FormValidation($val);
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$this->createInvalidCreateResponse($request, $response, $val);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user