diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-10-24 13:45:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 13:45:40 +0200 |
commit | b3a0d871174268f23e6edaf41a4fd615459d8f22 (patch) | |
tree | aa13a4eae215aec88ddb3aa272e739c7d8a3b5b5 /apps | |
parent | ded746f821360da5e99a88557f330cf4b28a48e3 (diff) | |
parent | 8dc449990dcd5a62e4280c1af9769582cf0a719a (diff) | |
download | nextcloud-server-b3a0d871174268f23e6edaf41a4fd615459d8f22.tar.gz nextcloud-server-b3a0d871174268f23e6edaf41a4fd615459d8f22.zip |
Merge pull request #10888 from nextcloud/bug/noid/fix-missing-quickaccess-favorite-folder-on-add
Bug/noid/fix missing quickaccess favorite folder on add
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/appinfo/routes.php | 5 | ||||
-rw-r--r-- | apps/files/lib/Controller/ApiController.php | 12 |
2 files changed, 17 insertions, 0 deletions
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(); + } } |