diff --git a/WebServices/ResourcesWebService.php b/WebServices/ResourcesWebService.php index ec4484e89..5ebf40546 100644 --- a/WebServices/ResourcesWebService.php +++ b/WebServices/ResourcesWebService.php @@ -128,9 +128,10 @@ public function GetTypes() * @response ResourcesAvailabilityResponse * @return void */ - public function GetAvailability($resourceId = null) + public function GetAvailability() { $dateQueryString = $this->server->GetQueryString(WebServiceQueryStringKeys::DATE_TIME); + $resourceId = $this->server->GetQueryString(WebServiceQueryStringKeys::RESOURCE_ID); if (!empty($dateQueryString)) { $requestedTime = WebServiceDate::GetDate($dateQueryString, $this->server->GetSession()); @@ -144,7 +145,7 @@ public function GetAvailability($resourceId = null) $resources[] = $this->resourceRepository->LoadById($resourceId); } - $lastDateSearched = $requestedTime->AddDays(30); + $lastDateSearched = $requestedTime->AddDays(7); $reservations = $this->GetReservations($this->reservationRepository->GetReservations($requestedTime, $lastDateSearched, null, null, null, $resourceId)); $resourceAvailability = [];