ref: AjaxController
* refactor for readability
This commit is contained in:
parent
51ea4e2311
commit
8851c4f6e8
@ -141,7 +141,10 @@ class AjaxController extends AbstractController
|
||||
$route = Libs::getRouteDistance($origin, $destination);
|
||||
|
||||
if (!$route) {
|
||||
return $this->json(['success' => false, 'message' => 'No route found']);
|
||||
return $this->json([
|
||||
'success' => false,
|
||||
'message' => 'No route found'
|
||||
]);
|
||||
}
|
||||
|
||||
$ci = new CaseItinerary();
|
||||
@ -163,7 +166,10 @@ class AjaxController extends AbstractController
|
||||
'success',
|
||||
'Location added to itinerary'
|
||||
);
|
||||
return $this->json(['success' => true, 'message' => 'Location added to itinerary']);
|
||||
return $this->json([
|
||||
'success' => true,
|
||||
'message' => 'Location added to itinerary'
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/api/filter-itinerary-by-case', name: 'ajax_filter_itinerary_by_case')]
|
||||
|
Loading…
x
Reference in New Issue
Block a user