Skip to content

Commit c4155e2

Browse files
authored
Merge pull request #12441 from nextcloud/stable14-10888
[stable14] Fix missing quickaccess favorite folder on add
2 parents fc516b5 + 94a5ffe commit c4155e2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

apps/files/appinfo/routes.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@
8181
'url' => '/api/v1/toggleShowFolder/{key}',
8282
'verb' => 'POST'
8383
],
84+
[
85+
'name' => 'API#getNodeType',
86+
'url' => '/api/v1/quickaccess/get/NodeType',
87+
'verb' => 'GET',
88+
],
8489
]
8590
]
8691
);

apps/files/lib/Controller/ApiController.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,18 @@ public function toggleShowFolder(int $show, string $key) {
292292
return $response;
293293
}
294294

295+
/**
296+
* Get sorting-order for custom sorting
297+
*
298+
* @NoAdminRequired
299+
*
300+
* @param string
301+
* @return string
302+
* @throws \OCP\Files\NotFoundException
303+
*/
304+
public function getNodeType($folderpath) {
305+
$node = $this->userFolder->get($folderpath);
306+
return $node->getType();
307+
}
295308

296309
}

0 commit comments

Comments
 (0)