summaryrefslogtreecommitdiffstats
path: root/external/folderapi.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-05-02 17:23:13 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-05-02 17:23:13 +0200
commitd7014ce74f0f94e5558a2c309f4c9c49a04c3255 (patch)
treed560ea3465f68edc942014f120ff17e2ce3074d5 /external/folderapi.php
parentd89931b22abdcfe2ab4c6f4feb3b889d15524277 (diff)
added small result wrapper
Diffstat (limited to 'external/folderapi.php')
-rw-r--r--external/folderapi.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/external/folderapi.php b/external/folderapi.php
index 7d490ded4..629b1cff5 100644
--- a/external/folderapi.php
+++ b/external/folderapi.php
@@ -46,8 +46,16 @@ class FolderAPI extends Controller {
public function getAll() {
+ $userId = $this->api->getUserId();
+ $result = array(
+ 'folders' => array()
+ );
+ foreach ($this->folderBusinessLayer->findAll($userId) as $folder) {
+ array_push($result['folders'], $folder->toAPI());
+ }
+ return new APIResult($result);
}