summaryrefslogtreecommitdiffstats
path: root/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
diff options
context:
space:
mode:
authorAlex Pott2016-07-19 11:29:44 +0100
committerAlex Pott2016-07-19 11:29:44 +0100
commit2bb04688470217bfdac6e671e4cb520202dd7304 (patch)
treea876568bfc316d5fa7412c83763ed82a76404d4e /core/modules/rest/src/Plugin/rest/resource/EntityResource.php
parent8db32d1a2076c092874f9414ff4e0d07c64ace6e (diff)
Issue #2662284 by Wim Leers, swim, tedbow, dawehner: Return complete entity after successful PATCH
Diffstat (limited to 'core/modules/rest/src/Plugin/rest/resource/EntityResource.php')
-rw-r--r--core/modules/rest/src/Plugin/rest/resource/EntityResource.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
index 7e620df..8b96940 100644
--- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
+++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
@@ -229,8 +229,8 @@ class EntityResource extends ResourceBase implements DependentPluginInterface {
$original_entity->save();
$this->logger->notice('Updated entity %type with ID %id.', array('%type' => $original_entity->getEntityTypeId(), '%id' => $original_entity->id()));
- // Update responses have an empty body.
- return new ModifiedResourceResponse(NULL, 204);
+ // Return the updated entity in the response body.
+ return new ModifiedResourceResponse($original_entity, 200);
}
catch (EntityStorageException $e) {
throw new HttpException(500, 'Internal Server Error', $e);