]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix for favorites-quickaccess: newly added folders dont show up when added to favorites
authorFelix Nüsse <Felix.nuesse@t-online.de>
Mon, 27 Aug 2018 15:39:39 +0000 (17:39 +0200)
committerfnuesse <felix.nuesse@t-online.de>
Tue, 13 Nov 2018 16:22:40 +0000 (17:22 +0100)
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
apps/files/appinfo/routes.php
apps/files/lib/Controller/ApiController.php

index 1147bdf9c4fddd9d677fe0a3fa9dc5f64cba0055..b32469c8574b81b04ba43e04ca737b4178d28d7a 100644 (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',
+                       ],
                ]
        ]
 );
index 9443b9776ae3d926ce953dcbb48fe3604e55c8b5..27cd0b361c5f2b8803e0daa60b5a68645677ecac 100644 (file)
@@ -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();
+       }
 
 }