Skip to content

Commit

Permalink
Merge pull request #311 from cultuurnet/hotfix-for-missing-default-qu…
Browse files Browse the repository at this point in the history
…eries

Hotfix for missing default queries
  • Loading branch information
LucWollants authored Aug 27, 2024
2 parents abbf9eb + fec8e5b commit b8ce5fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
27 changes: 10 additions & 17 deletions app/RoutingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use CultuurNet\UDB3\Search\Http\Authentication\Token\ManagementTokenProvider;
use CultuurNet\UDB3\Search\Http\Authentication\MetadataGenerator;
use CultuurNet\UDB3\Search\Http\DefaultQuery\InMemoryDefaultQueryRepository;
use CultuurNet\UDB3\Search\Http\OfferSearchController;
use CultuurNet\UDB3\Search\Http\OrganizerSearchController;
use CultuurNet\UDB3\SearchService\Error\LoggerFactory;
use CultuurNet\UDB3\SearchService\Error\LoggerName;
Expand Down Expand Up @@ -96,35 +95,29 @@ function (): Router {
$router->get('/organizers/', OrganizerSearchController::class);
$router->options('/organizers/', $optionsResponse);

/** @var OfferSearchController $offerController */
$offerController = $this->get('offer_controller');
$router->get('/offers', $offerController);
$router->get('/offers', ['offer_controller', '__invoke']);
$router->options('/offers', $optionsResponse);
$router->get('/offers/', $offerController);
$router->get('/offers/', ['offer_controller', '__invoke']);
$router->options('/offers/', $optionsResponse);

/** @var OfferSearchController $eventController */
$eventController = $this->get('event_controller');
$router->get('/events', $eventController);
$router->get('/events', ['event_controller', '__invoke']);
$router->options('/events', $optionsResponse);
$router->get('/events/', $eventController);
$router->get('/events/', ['event_controller', '__invoke']);
$router->options('/events/', $optionsResponse);

/** @var OfferSearchController $placeController */
$placeController = $this->get('place_controller');
$router->get('/places', $placeController);
$router->get('/places', ['place_controller', '__invoke']);
$router->options('/places', $optionsResponse);
$router->get('/places/', $placeController);
$router->get('/places/', ['place_controller', '__invoke']);
$router->options('/places/', $optionsResponse);

$router->get('/event', $eventController);
$router->get('/event', ['event_controller', '__invoke']);
$router->options('/event', $optionsResponse);
$router->get('/event/', $eventController);
$router->get('/event/', ['event_controller', '__invoke']);
$router->options('/event/', $optionsResponse);

$router->get('/place', $placeController);
$router->get('/place', ['place_controller', '__invoke']);
$router->options('/place', $optionsResponse);
$router->get('/place/', $placeController);
$router->get('/place/', ['place_controller', '__invoke']);
$router->options('/place/', $optionsResponse);

return $router;
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ parameters:
- app
- src
- tests
excludePaths:
- app/RoutingServiceProvider.php

0 comments on commit b8ce5fc

Please sign in to comment.