summaryrefslogtreecommitdiffstats
path: root/controller/itemcontroller.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-13 22:48:54 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-13 22:48:54 +0200
commitf333f6b38f985c40247f7c82dd462f3016611dfe (patch)
tree80d7b1eed242e46af01cba658313703428ccb699 /controller/itemcontroller.php
parentb9de58c0c9da63f6a489df416df1819a40cb507d (diff)
fix js tests
Diffstat (limited to 'controller/itemcontroller.php')
-rw-r--r--controller/itemcontroller.php18
1 files changed, 4 insertions, 14 deletions
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php
index 3313f583b..67efb4b85 100644
--- a/controller/itemcontroller.php
+++ b/controller/itemcontroller.php
@@ -116,11 +116,6 @@ class ItemController extends Controller {
}
- private function setStarred($isStarred, $feedId, $guidHash){
- $this->itemBusinessLayer->star($feedId, $guidHash, $isStarred, $this->userId);
- }
-
-
/**
* @NoAdminRequired
*
@@ -129,7 +124,7 @@ class ItemController extends Controller {
*/
public function star($feedId, $guidHash){
try {
- $this->setStarred(true, $feedId, $guidHash);
+ $this->itemBusinessLayer->star($feedId, $guidHash, true, $this->userId);
} catch(BusinessLayerException $ex) {
return $this->error($ex, Http::STATUS_NOT_FOUND);
}
@@ -144,18 +139,13 @@ class ItemController extends Controller {
*/
public function unstar($feedId, $guidHash){
try {
- $this->setStarred(false, $feedId, $guidHash);
+ $this->itemBusinessLayer->star($feedId, $guidHash, false, $this->userId);
} catch(BusinessLayerException $ex) {
return $this->error($ex, Http::STATUS_NOT_FOUND);
}
}
- private function setRead($isRead, $itemId){
- $this->itemBusinessLayer->read($itemId, $isRead, $this->userId);
- }
-
-
/**
* @NoAdminRequired
*
@@ -163,7 +153,7 @@ class ItemController extends Controller {
*/
public function read($itemId){
try {
- $this->setRead(true);
+ $this->itemBusinessLayer->read($itemId, true, $this->userId);
} catch(BusinessLayerException $ex) {
return $this->error($ex, Http::STATUS_NOT_FOUND);
}
@@ -177,7 +167,7 @@ class ItemController extends Controller {
*/
public function unread($itemId){
try {
- $this->setRead(false);
+ $this->itemBusinessLayer->read($itemId, false, $this->userId);
} catch(BusinessLayerException $ex) {
return $this->error($ex, Http::STATUS_NOT_FOUND);
}