diff --git a/src/EventSubscriber/ResponseSubscriber.php b/src/EventSubscriber/ResponseSubscriber.php index ab31f1ba0094af39f0003845defe879be431cb5d..d94e88f8a111a2177fa361b7f7104750e5cd029e 100644 --- a/src/EventSubscriber/ResponseSubscriber.php +++ b/src/EventSubscriber/ResponseSubscriber.php @@ -54,7 +54,7 @@ class ResponseSubscriber implements EventSubscriberInterface { } public function __construct(ConfigFactoryInterface $config_factory, CurrentRouteMatch $current_route_match) { - $this->config = $config_factory->get('jsonapi_links'); + $this->config = $config_factory->get('jsonapi_links.settings'); $this->currentRouteMatch = $current_route_match; } @@ -100,7 +100,7 @@ class ResponseSubscriber implements EventSubscriberInterface { /** * Unsets links in JSON:API responses. */ - protected function removeLinks(&$data, ?string $node = NULL) { + protected function removeLinks(&$data, string|int|null $node = NULL) { if ($node) { $this->path[] = $node; }