summaryrefslogtreecommitdiffstats
path: root/controller/itemapicontroller.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-14 02:16:31 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-14 02:16:31 +0200
commitacc2df1251a1c1b9ec5ede13bdf46d516dc64b0d (patch)
treece8503baa37cc05379dfd43a65e9acf0b41e0d97 /controller/itemapicontroller.php
parentdb4c29e89d77955c4930731ade08816f5567fe84 (diff)
use more flexible serializer that ignores nulls, non entity values and responses
Diffstat (limited to 'controller/itemapicontroller.php')
-rw-r--r--controller/itemapicontroller.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/controller/itemapicontroller.php b/controller/itemapicontroller.php
index 9e4fb672c..8110c3ab0 100644
--- a/controller/itemapicontroller.php
+++ b/controller/itemapicontroller.php
@@ -34,6 +34,7 @@ class ItemApiController extends ApiController {
parent::__construct($appName, $request);
$this->itemBusinessLayer = $itemBusinessLayer;
$this->userId = $userId;
+ $this->registerSerializer(new EntityApiSerializer('items'));
}
@@ -49,8 +50,6 @@ class ItemApiController extends ApiController {
* @param int $offset
*/
public function index($type, $id, $getRead, $batchSize=20, $offset=0) {
- $this->registerSerializer(new EntityApiSerializer('items'));
-
return $this->itemBusinessLayer->findAll($id, $type, $batchSize, $offset,
$getRead, $this->userId);
}
@@ -66,8 +65,6 @@ class ItemApiController extends ApiController {
* @param int $lastModified
*/
public function updated($type, $id, $lastModified=0) {
- $this->registerSerializer(new EntityApiSerializer('items'));
-
return $this->itemBusinessLayer->findAllNew($id, $type, $lastModified,
true, $this->userId);
}