From 13a22c7224ecb6714565e1b9f790459b5e3c180d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20N=C3=BCsse?= Date: Mon, 27 Aug 2018 17:39:39 +0200 Subject: [PATCH] fix for favorites-quickaccess: newly added folders dont show up when added to favorites Signed-off-by: fnuesse --- apps/files/appinfo/routes.php | 5 +++++ apps/files/lib/Controller/ApiController.php | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index 1147bdf9c4f..b32469c8574 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -81,6 +81,11 @@ $application->registerRoutes( 'url' => '/api/v1/toggleShowFolder/{key}', 'verb' => 'POST' ], + [ + 'name' => 'API#getNodeType', + 'url' => '/api/v1/quickaccess/get/NodeType', + 'verb' => 'GET', + ], ] ] ); diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index 9443b9776ae..27cd0b361c5 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -292,5 +292,17 @@ class ApiController extends Controller { return $response; } + /** + * Get sorting-order for custom sorting + * + * @NoAdminRequired + * + * @param String + * @return String + */ + public function getNodeType($folderpath) { + $node = $this->userFolder->get($folderpath); + return $node->getType(); + } } -- 2.39.5