diff options
Diffstat (limited to 'controller/foldercontroller.php')
-rw-r--r-- | controller/foldercontroller.php | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/controller/foldercontroller.php b/controller/foldercontroller.php index 1137a2528..576fee422 100644 --- a/controller/foldercontroller.php +++ b/controller/foldercontroller.php @@ -57,33 +57,15 @@ class FolderController extends Controller { } - private function setOpened($isOpened, $folderId) { - $this->folderService->open($folderId, $isOpened, $this->userId); - } - - - /** - * @NoAdminRequired - * - * @param int $folderId - */ - public function open($folderId) { - try { - $this->setOpened(true, $folderId); - } catch(ServiceNotFoundException $ex) { - return $this->error($ex, Http::STATUS_NOT_FOUND); - } - } - - /** * @NoAdminRequired * * @param int $folderId + * @param bool $open */ - public function collapse($folderId) { + public function open($folderId, $open) { try { - $this->setOpened(false, $folderId); + $this->folderService->open($folderId, $open, $this->userId); } catch(ServiceNotFoundException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } |