diff --git a/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php b/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php index 51bb3d4..ec92268 100644 --- a/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php +++ b/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php @@ -159,22 +159,6 @@ public function post(UserInterface $account = NULL) { } /** - * {@inheritdoc} - */ - public function routes() { - $collection = new RouteCollection(); - - $route = $this->getBaseRoute('/user/register', 'POST'); - - // Restrict the incoming HTTP Content-type header to the known serialization - // formats. - $route->addRequirements(['_content_type_format' => implode('|', $this->serializerFormats)]); - $collection->add("$this->pluginId", $route); - - return $collection; - } - - /** * Verifies that the whole entity does not violate any validation constraints. * * @param \Drupal\user\UserInterface $entity diff --git a/core/modules/rest/src/Tests/RegisterUserTest.php b/core/modules/rest/src/Tests/RegisterUserTest.php index bda801c..c4cdc48 100644 --- a/core/modules/rest/src/Tests/RegisterUserTest.php +++ b/core/modules/rest/src/Tests/RegisterUserTest.php @@ -84,7 +84,7 @@ public function testRegisterUser() { $serialized = $this->container->get('serializer')->serialize($data, 'hal_json'); // Post to the REST service to register the user. - $this->httpRequest('entity/user/register', 'POST', $serialized, 'application/hal+json'); + $this->httpRequest('/user/register', 'POST', $serialized, 'application/hal+json'); $this->assertResponse('201', 'HTTP response code is correct.'); // Obtain the uid from the header.