summaryrefslogtreecommitdiffstats
path: root/appinfo
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-19 14:14:01 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-19 14:14:01 +0100
commit62b6bd485009b5dbb85b50e634ea94aa177d8d42 (patch)
tree089454ad9588ef97fa96b9199ed26aaedb19d12f /appinfo
parent322726c37f0cabad1a2021126d4d420bce914574 (diff)
controller action for recommended sites
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/application.php6
-rw-r--r--appinfo/routes.php1
2 files changed, 6 insertions, 1 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
index 727fe2dd3..11a38ad93 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -62,6 +62,7 @@ use \OCA\News\ArticleEnhancer\GlobalArticleEnhancer;
use \OCA\News\ArticleEnhancer\XPathArticleEnhancer;
use \OCA\News\ArticleEnhancer\RegexArticleEnhancer;
+use \OCA\News\RecommendedSites\RecommendedSites;
class Application extends App {
@@ -84,6 +85,7 @@ class Application extends App {
$c->query('AppConfig'),
$c->query('Config'),
$c->query('L10N'),
+ $c->query('RecommendedSites'),
$c->query('UserId')
);
});
@@ -511,7 +513,9 @@ class Application extends App {
);
});
-
+ $container->registerService('RecommendedSites', function($c) {
+ return new RecommendedSites(__DIR__ . '/../recommendedsites');
+ });
}
public function getAppConfig() {
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 146236940..9b03cb5b7 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -22,6 +22,7 @@ $application->registerRoutes($this, ['routes' => [
['name' => 'page#settings', 'url' => '/settings', 'verb' => 'GET'],
['name' => 'page#update_settings', 'url' => '/settings', 'verb' => 'PUT'],
['name' => 'page#manifest', 'url' => '/manifest.webapp', 'verb' => 'GET'],
+['name' => 'page#recommended', 'url' => '/recommended', 'verb' => 'GET'],
// admin
['name' => 'admin#update', 'url' => '/admin', 'verb' => 'PUT'],