diff --git a/src/Controller/APIController.php b/src/Controller/APIController.php index e2e60b22..02982abd 100644 --- a/src/Controller/APIController.php +++ b/src/Controller/APIController.php @@ -2288,6 +2288,13 @@ class APIController extends Controller implements LoggedController ]; $res->setData($data); + // check if is_covered is false. If so, we need to set the error part in the response + if (!$is_covered) + { + $res->setError(true) + ->setErrorMessage('Oops! Our service is limited to some areas in Metro Manila, Laguna, and Baguio only. We will update you as soon as we are able to cover your area'); + } + return $res->getReturnResponse(); }