Merge branch '132-more-rider-api-calls' into 'master'
Resolve "More rider api calls" Closes #132 See merge request jankstudio/resq!115
This commit is contained in:
commit
8121517ab1
1 changed files with 23 additions and 0 deletions
|
|
@ -241,6 +241,29 @@ class RAPIController extends Controller
|
||||||
|
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
$hub = $rider->getHub();
|
||||||
|
if ($hub == null)
|
||||||
|
$hub_data = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$coord = $hub->getCoordinates();
|
||||||
|
$hub_data = [
|
||||||
|
'id' => $hub->getID(),
|
||||||
|
'name' => $hub->getName(),
|
||||||
|
'branch' => $hub->getBranch(),
|
||||||
|
'longitude' => $coord->getLongitude(),
|
||||||
|
'latitude' => $coord->getLatitude(),
|
||||||
|
'contact_nums' => $hub->getContactNumbers(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// data
|
||||||
|
$data = [
|
||||||
|
'hub' => $hub_data
|
||||||
|
];
|
||||||
|
|
||||||
|
$res->setData($data);
|
||||||
|
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue