diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-08-28 08:36:42 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-08-28 08:36:42 +0200 |
commit | 4acfe5ab74ce777b0f09fe5964f113666ac1f4f1 (patch) | |
tree | 2625553315e7eaf94dff548bf657289a334854f3 | |
parent | f096c85401aa9b77a4df6c4ff6b965fc8ea26a9a (diff) |
Fix #24
-rw-r--r-- | lib/Controller/ItemApiController.php | 4 | ||||
-rw-r--r-- | tests/Unit/Controller/ItemApiControllerTest.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Controller/ItemApiController.php b/lib/Controller/ItemApiController.php index 43ff842b8..98342cd26 100644 --- a/lib/Controller/ItemApiController.php +++ b/lib/Controller/ItemApiController.php @@ -74,8 +74,10 @@ class ItemApiController extends ApiController { * @return array|mixed */ public function updated($type=3, $id=0, $lastModified=0) { + // needs to be turned into a millisecond timestamp to work properly + $paddedLastModified = $lastModified . '000000'; return $this->serializer->serialize( - $this->itemService->findAllNew($id, $type, $lastModified, + $this->itemService->findAllNew($id, $type, $paddedLastModified, true, $this->userId) ); } diff --git a/tests/Unit/Controller/ItemApiControllerTest.php b/tests/Unit/Controller/ItemApiControllerTest.php index 393c6198b..9ce405956 100644 --- a/tests/Unit/Controller/ItemApiControllerTest.php +++ b/tests/Unit/Controller/ItemApiControllerTest.php @@ -105,7 +105,7 @@ class ItemApiControllerTest extends \PHPUnit_Framework_TestCase { ->with( $this->equalTo(2), $this->equalTo(1), - $this->equalTo(30), + $this->equalTo('30000000'), $this->equalTo(true), $this->equalTo($this->user) ) |