Fix responses for verifyJobOrder. #424
This commit is contained in:
parent
3abb6f0efb
commit
2f8dca3dbc
1 changed files with 8 additions and 6 deletions
|
|
@ -2083,7 +2083,10 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
$data = $this->checkJO($req, $required_params, $jo);
|
$data = $this->checkJO($req, $required_params, $jo);
|
||||||
if (isset($data['error']))
|
if (isset($data['error']))
|
||||||
{
|
{
|
||||||
$data['title'] = 'Failed Verify Job Order';
|
$data = [
|
||||||
|
'assigned' => false,
|
||||||
|
'available' => false,
|
||||||
|
];
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2092,16 +2095,15 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
($jo->getStatus() == JOStatus::CANCELLED))
|
($jo->getStatus() == JOStatus::CANCELLED))
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'title' => 'Failed Verify Job Order',
|
'assigned' => 'true',
|
||||||
'error' => 'Job order has been fulfilled or cancelled.'
|
'available' => 'false'
|
||||||
];
|
];
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
$jo_data = $this->formatJobOrderData($req, $jo);
|
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'job_order' => $jo_data
|
'assigned' => true,
|
||||||
|
'available' => true,
|
||||||
];
|
];
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue