Merge pull request #12441 from nextcloud/stable14-10888

[stable14] Fix missing quickaccess favorite folder on add
This commit is contained in:
Morris Jobke 2018-11-14 21:18:33 +01:00 committed by GitHub
commit c4155e2f18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -81,6 +81,11 @@ $application->registerRoutes(
'url' => '/api/v1/toggleShowFolder/{key}',
'verb' => 'POST'
],
[
'name' => 'API#getNodeType',
'url' => '/api/v1/quickaccess/get/NodeType',
'verb' => 'GET',
],
]
]
);

View file

@ -292,5 +292,18 @@ class ApiController extends Controller {
return $response;
}
/**
* Get sorting-order for custom sorting
*
* @NoAdminRequired
*
* @param string
* @return string
* @throws \OCP\Files\NotFoundException
*/
public function getNodeType($folderpath) {
$node = $this->userFolder->get($folderpath);
return $node->getType();
}
}