diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-03-04 00:16:19 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | 409c8354336b0c96842da7ba6711468aa939d76e (patch) | |
tree | 3426a7b15214d0e077489c28b93c20182e51b765 /lib | |
parent | dd818c6203961a82aeef58bcf526aced7b361f04 (diff) |
🩹 Patch ItemController + test to use ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/ItemController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Controller/ItemController.php b/lib/Controller/ItemController.php index 4a01fb23c..e3ef4b9e5 100644 --- a/lib/Controller/ItemController.php +++ b/lib/Controller/ItemController.php @@ -24,6 +24,7 @@ use \OCP\AppFramework\Http; use \OCA\News\Service\Exceptions\ServiceException; use \OCA\News\Service\Exceptions\ServiceNotFoundException; use \OCA\News\Service\ItemServiceV2; +use \OCA\News\Service\ShareService; use OCP\IUserSession; /** @@ -44,6 +45,10 @@ class ItemController extends Controller */ private $feedService; /** + * @var ShareService + */ + private $shareService; + /** * @var IConfig */ private $settings; @@ -52,12 +57,14 @@ class ItemController extends Controller IRequest $request, FeedServiceV2 $feedService, ItemServiceV2 $itemService, + ShareService $shareService, IConfig $settings, ?IUserSession $userSession ) { parent::__construct($request, $userSession); $this->itemService = $itemService; $this->feedService = $feedService; + $this->shareService = $shareService; $this->settings = $settings; } @@ -329,7 +336,7 @@ class ItemController extends Controller public function share($itemId, $shareWithId) { try { - $this->itemService->share( + $this->shareService->share( $this->getUserId(), $itemId, $shareWithId |