diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2020-08-29 23:39:35 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2020-09-27 15:35:31 +0200 |
commit | d00d1ab2a28f428223e52b17052c072c64784016 (patch) | |
tree | c019f85fb7ac67147dd43ca64b4ac3cda99832f7 /lib/Controller/FeedController.php | |
parent | 5687baca75d47dbdffd3de74e865ad2f71ef0cb7 (diff) |
Create V2 mapper, Service and management commands
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Controller/FeedController.php')
-rw-r--r-- | lib/Controller/FeedController.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Controller/FeedController.php b/lib/Controller/FeedController.php index 32e9bd232..40aef909a 100644 --- a/lib/Controller/FeedController.php +++ b/lib/Controller/FeedController.php @@ -13,6 +13,8 @@ namespace OCA\News\Controller; +use OCA\News\Service\Exceptions\ServiceConflictException; +use OCA\News\Service\Exceptions\ServiceNotFoundException; use OCP\IRequest; use OCP\IConfig; use OCP\AppFramework\Controller; @@ -21,8 +23,6 @@ use OCP\AppFramework\Http; use OCA\News\Service\ItemService; use OCA\News\Service\FeedService; use OCA\News\Service\FolderService; -use OCA\News\Service\ServiceNotFoundException; -use OCA\News\Service\ServiceConflictException; use OCA\News\Db\FeedType; class FeedController extends Controller @@ -63,7 +63,7 @@ class FeedController extends Controller // because of this we also pass the starred count and the newest // item id which will be used for marking feeds read $params = [ - 'feeds' => $this->feedService->findAll($this->userId), + 'feeds' => $this->feedService->findAllForUser($this->userId), 'starred' => $this->itemService->starredCount($this->userId) ]; @@ -104,9 +104,9 @@ class FeedController extends Controller // check if feed or folder exists try { if ($feedType === FeedType::FOLDER) { - $this->folderService->find($feedId, $this->userId); + $this->folderService->find($this->userId, $feedId); } elseif ($feedType === FeedType::FEED) { - $this->feedService->find($feedId, $this->userId); + $this->feedService->find($this->userId, $feedId); // if its the first launch, those values will be null } elseif ($feedType === null) { @@ -203,7 +203,7 @@ class FeedController extends Controller public function update($feedId) { try { - $feed = $this->feedService->update($feedId, $this->userId); + $feed = $this->feedService->update($this->userId, $feedId); return [ 'feeds' => [ |