Change message when no hubs are found. Add checking for null if no hubs are found. #653
This commit is contained in:
parent
b7159c127c
commit
c8629692e9
1 changed files with 10 additions and 7 deletions
|
|
@ -2675,7 +2675,7 @@ class APIController extends Controller implements LoggedController
|
|||
if (empty($nearest_hub_slots['hub']))
|
||||
{
|
||||
$res->setError(true)
|
||||
->setErrorMessage('Thank you for reaching out to us. Due to the General Community Quarantine, our Operations are from 8AM to 6PM only. Please expect a call from us tomorrow and we will assist you with your request. Thank you and stay safe!');
|
||||
->setErrorMessage('Thank you for reaching out to us. Please expect a call from us and we will assist you with your request. Thank you and stay safe!');
|
||||
return $res->getReturnResponse();
|
||||
}
|
||||
}
|
||||
|
|
@ -2687,7 +2687,7 @@ class APIController extends Controller implements LoggedController
|
|||
if (empty($nearest_hub_slots['hub']))
|
||||
{
|
||||
$res->setError(true)
|
||||
->setErrorMessage('Thank you for reaching out to us. Due to the General Community Quarantine, our Operations are from 8AM to 6PM only. Please expect a call from us tomorrow and we will assist you with your request. Thank you and stay safe!');
|
||||
->setErrorMessage('Thank you for reaching out to us. Please expect a call from us and we will assist you with your request. Thank you and stay safe!');
|
||||
return $res->getReturnResponse();
|
||||
}
|
||||
}
|
||||
|
|
@ -4365,11 +4365,14 @@ class APIController extends Controller implements LoggedController
|
|||
}
|
||||
}
|
||||
|
||||
// set hub data to what is in nearest
|
||||
$hub_data = [
|
||||
'hub' => $nearest['hub'],
|
||||
'slots' => $hub_slots['slot_data'],
|
||||
];
|
||||
if ($nearest != null)
|
||||
{
|
||||
// set hub data to what is in nearest
|
||||
$hub_data = [
|
||||
'hub' => $nearest['hub'],
|
||||
'slots' => $hub_slots['slot_data'],
|
||||
];
|
||||
}
|
||||
|
||||
return $hub_data;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue