diff --git a/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php b/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php index d5ce5cc..25b895f 100644 --- a/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php +++ b/core/modules/rest/src/Plugin/rest/resource/UserRegistrationResource.php @@ -4,7 +4,7 @@ use Drupal\Core\Config\ImmutableConfig; use Drupal\Core\Session\AccountInterface; -use Drupal\rest\NonCacheableResourceResponse; +use Drupal\rest\ModifiedResourceResponse; use Drupal\user\UserInterface; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -84,7 +84,7 @@ public static function create(ContainerInterface $container, array $configuratio * @param \Drupal\user\UserInterface $account * The user account entity. * - * @return \Drupal\rest\NonCacheableResourceResponse + * @return \Drupal\rest\ModifiedResourceResponse * The HTTP response object. * * @throws \Symfony\Component\HttpKernel\Exception\HttpException @@ -149,7 +149,7 @@ public function post(UserInterface $account = NULL) { } $url = $account->urlInfo('canonical', ['absolute' => TRUE])->toString(TRUE); - $response = new NonCacheableResourceResponse(NULL, 201, ['Location' => $url->getGeneratedUrl()]); + $response = new ModifiedResourceResponse(NULL, 201, ['Location' => $url->getGeneratedUrl()]); return $response; }