src/Routing/Routes.php | 2 +- tests/src/Unit/Routing/RoutesTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Routing/Routes.php b/src/Routing/Routes.php index e8d435f..7c3c5f7 100644 --- a/src/Routing/Routes.php +++ b/src/Routing/Routes.php @@ -81,7 +81,7 @@ class Routes implements ContainerInjectionInterface { $collection = new RouteCollection(); $path_prefix = $this->resourceTypeRepository->getPrefixPathSegment(); - $route_collection = (new Route('/' . $path_prefix, [ + $route_collection = (new Route($path_prefix, [ RouteObjectInterface::CONTROLLER_NAME => '\Drupal\jsonapi\Controller\EntryPoint::index', ])) ->setRequirement('_permission', 'access jsonapi resource list') diff --git a/tests/src/Unit/Routing/RoutesTest.php b/tests/src/Unit/Routing/RoutesTest.php index 67f3c1a..de3c6ed 100644 --- a/tests/src/Unit/Routing/RoutesTest.php +++ b/tests/src/Unit/Routing/RoutesTest.php @@ -47,7 +47,7 @@ class RoutesTest extends UnitTestCase { $type_3->setRelatableResourceTypes([]); $resource_type_repository = $this->prophesize(ResourceTypeRepository::class); $resource_type_repository->all()->willReturn([$type_1, $type_2, $type_3]); - $resource_type_repository->getPathPrefix()->willReturn('jsonapi'); + $resource_type_repository->getPrefixPathSegment()->willReturn('/jsonapi'); $container = $this->prophesize(ContainerInterface::class); $container->get('jsonapi.resource_type.repository')->willReturn($resource_type_repository->reveal()); $auth_collector = $this->prophesize(AuthenticationCollectorInterface::class);