summaryrefslogtreecommitdiffstats
path: root/controller/itemcontroller.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/itemcontroller.php')
-rw-r--r--controller/itemcontroller.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php
index d19707f90..698c7a093 100644
--- a/controller/itemcontroller.php
+++ b/controller/itemcontroller.php
@@ -40,8 +40,8 @@ class ItemController extends Controller {
private $feedBusinessLayer;
public function __construct(API $api, Request $request,
- ItemBusinessLayer $itemBusinessLayer,
- FeedBusinessLayer $feedBusinessLayer){
+ FeedBusinessLayer $feedBusinessLayer,
+ ItemBusinessLayer $itemBusinessLayer){
parent::__construct($api, $request);
$this->itemBusinessLayer = $itemBusinessLayer;
$this->feedBusinessLayer = $feedBusinessLayer;
@@ -171,20 +171,14 @@ class ItemController extends Controller {
* @IsSubAdminExemption
* @Ajax
*/
- public function readFeed(){
+ public function readAll(){
$userId = $this->api->getUserId();
- $feedId = (int) $this->params('feedId');
$highestItemId = (int) $this->params('highestItemId');
- $this->itemBusinessLayer->readFeed($feedId, $highestItemId, $userId);
+ $this->itemBusinessLayer->readAll($highestItemId, $userId);
$params = array(
- 'feeds' => array(
- array(
- 'id' => $feedId,
- 'unreadCount' => 0
- )
- )
+ 'feeds' => $this->feedBusinessLayer->findAll($userId)
);
return $this->renderJSON($params);
}