Skip to content

Commit

Permalink
Fixed resource get request
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Nov 2, 2024
1 parent ea7b470 commit c1d6ee9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Feed/CalendarApiFeedType.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,13 @@ public function getConfigOptions(Request $request, FeedSource $feedSource, strin
try {
if ('resources' === $name) {
$secrets = $feedSource->getSecrets();
$locationIds = $secrets->locationIds ?? [];
$locationIds = $secrets['locations'] ?? [];

$resources = [];

foreach ($locationIds as $locationId) {
$resources = array_unique(array_merge($resources, $this->getLocationResources($locationId)));
$locationResources = $this->getLocationResources($locationId);
$resources = array_merge($resources, $locationResources);
}

$resourceOptions = array_map(function (CalendarResource $resource) {
Expand Down

0 comments on commit c1d6ee9

Please sign in to comment.