summaryrefslogtreecommitdiffstats
path: root/appinfo
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2013-03-03 22:27:18 +0100
committerAlessandro Cosentino <cosenal@gmail.com>2013-03-03 22:27:18 +0100
commitef450898bb702877dafb755e425fe8f37b23417b (patch)
tree53162b432a7f5a6c9d99d9eb77aee30d670853ae /appinfo
parent0852773340ed26ecc8faa8e61192f38132673bc6 (diff)
create folder api call
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/bootstrap.php11
-rw-r--r--appinfo/routes.php3
2 files changed, 9 insertions, 5 deletions
diff --git a/appinfo/bootstrap.php b/appinfo/bootstrap.php
index c7ce8fb62..10ddeadc6 100644
--- a/appinfo/bootstrap.php
+++ b/appinfo/bootstrap.php
@@ -2,7 +2,7 @@
/**
* ownCloud - News app
*
-* @author Alessandro Copyright
+* @author Alessandro Cosentino
* @author Bernhard Posselt
* @copyright 2012 Alessandro Cosentino cosenal@gmail.com
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
@@ -126,13 +126,14 @@ function createDIContainer(){
/**
* EXTERNAL API LAYER
*/
- $newsContainer['API_Feed'] = $newsContainer->share(function($c){
- return new API_($c['FolderMapper']);
+ $newsContainer['API_Folder'] = $newsContainer->share(function($c){
+ return new API_Folder($c['FolderBL']);
});
- $newsContainer['API_Folder'] = $newsContainer->share(function($c){
- return new FeedBL($c['FeedMapper']);
+ $newsContainer['API_Feed'] = $newsContainer->share(function($c){
+ return new API_Feed($c['FeedBL']);
});
+
return $newsContainer;
} \ No newline at end of file
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 66dedd7f0..0370ecb93 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -222,4 +222,7 @@ $this->create('news_ajax_importOPML', '/import')->action(
*/
\OCP\API::register(
'get', '/news/folders', array('OCA\News\API_Folder', 'getAll'), 'news', \OC_API::USER_AUTH
+);
+\OCP\API::register(
+ 'post', '/news/folders/create', array('OCA\News\API_Folder', 'create'), 'news', \OC_API::USER_AUTH
); \ No newline at end of file