Make sure blank job_order is in data for get ongoing job order rider api call #424

This commit is contained in:
Kendrick Chan 2020-06-23 00:10:08 +08:00
parent 9d41ecb228
commit 16b136b0d3

View file

@ -1911,6 +1911,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
if (isset($data['error']))
{
$data['title'] = 'Failed Get Ongoing Job Order';
$data['job_order'] = null;
return $data;
}
@ -1919,7 +1920,8 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
{
$data = [
'title' => 'Failed Get Ongoing Job Order',
'error' => 'No logged in rider.'
'error' => 'No logged in rider.',
'job_order' => null,
];
return $data;
}
@ -1932,7 +1934,8 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
{
$data = [
'title' => 'Failed Get Ongoing Job Order',
'error' => 'No active job order.'
'error' => 'No active job order.',
'job_order' => null,
];
return $data;
}