Skip to content

Commit

Permalink
Fix handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Jan 20, 2014
1 parent bdf3f97 commit 2772222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ZfrRest/Mvc/Controller/MethodHandler/PostHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function handleMethod(AbstractController $controller, ResourceInterface $
}

$singleResource = $resource->getMetadata()->createResource();
$data = json_decode($controller->getResponse()->getContent(), true);
$data = json_decode($controller->getRequest()->getContent(), true);

$data = $this->validateData($singleResource, $data);
$data = $this->hydrateData($singleResource, $data);
Expand Down
2 changes: 1 addition & 1 deletion src/ZfrRest/Mvc/Controller/MethodHandler/PutHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function handleMethod(AbstractController $controller, ResourceInterface $
throw new MethodNotAllowedException();
}

$data = json_decode($controller->getResponse()->getContent(), true);
$data = json_decode($controller->getRequest()->getContent(), true);

$data = $this->validateData($resource, $data);
$data = $this->hydrateData($resource, $data);
Expand Down

0 comments on commit 2772222

Please sign in to comment.