diff options
Diffstat (limited to 'lib/Controller/ItemController.php')
-rw-r--r-- | lib/Controller/ItemController.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Controller/ItemController.php b/lib/Controller/ItemController.php index 85f67ef7a..57ad318d2 100644 --- a/lib/Controller/ItemController.php +++ b/lib/Controller/ItemController.php @@ -318,4 +318,24 @@ class ItemController extends Controller } } } + + + /** + * @NoAdminRequired + * + * @param int $itemId + * @param string $shareWithId + * @return array + */ + public function share($itemId, $shareWithId) + { + try { + $this->itemService->shareItem($itemId, $shareWithId, $this->userId); + } catch (ServiceNotFoundException $ex) { + return $this->error($ex, Http::STATUS_NOT_FOUND); + } + + return []; + } + } |