API response adjustments.
This commit is contained in:
1 parent
a4ec188cff
commit
7b6d1408f8
3 files changed
+12
-3
No files matched your search
@@ -27,7 +27,7 @@ class SearchRoomsController extends AbstractController
|
||||
|
||||
$rs = $repoAvailability->getAvailabilityForPeriod($startDate, $endDate);
|
||||
|
||||
return $this->json($rs);
|
||||
return $this->json(["results" => $rs]);
|
||||
}
|
||||
|
||||
#[Route('/api/search/availabilityDetails', name: 'app_search_availabilityDetails')]
|
||||
@@ -70,9 +70,13 @@ class SearchRoomsController extends AbstractController
|
||||
throw new \Exception('Invalid time interval', 400);
|
||||
}
|
||||
|
||||
$rs = $priceService->getFinalPricesForSearch($roomCategory, $startDate, $endDate);
|
||||
$fareList = $priceService->getFinalPricesForSearch($roomCategory, $startDate, $endDate);
|
||||
$rs = [];
|
||||
foreach ($fareList as $key => $value) {
|
||||
$rs[] = [ "guestNumber" => $key, "price" => $value];
|
||||
}
|
||||
|
||||
return $this->json(["prices" => $rs]);
|
||||
return $this->json(["results" => $rs]);
|
||||
}
|
||||
|
||||
#[Route('/search/debug', name: 'app_search_faresDebug')]
|
||||
|
||||
Reference in new issue
Block a user