summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/newsapi.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/external/newsapi.php b/external/newsapi.php
index cb6231b80..331b65556 100644
--- a/external/newsapi.php
+++ b/external/newsapi.php
@@ -30,12 +30,16 @@ use \OCA\AppFramework\Controller\Controller;
use \OCA\AppFramework\Http\Request;
use \OCA\AppFramework\Http\JSONResponse;
+use \OCA\News\Utility\Updater;
+
class NewsAPI extends Controller {
+ private $updater;
- public function __construct(API $api, Request $request){
+ public function __construct(API $api, Request $request, Updater $updater){
parent::__construct($api, $request);
+ $this->updater = $updater;
}
@@ -52,4 +56,15 @@ class NewsAPI extends Controller {
}
+ /**
+ * @IsAdminExemption
+ * @IsSubAdminExemption
+ * @CSRFExemption
+ * @Ajax
+ * @API
+ */
+ public function cleanUp() {
+ $this->updater->cleanUp();
+ }
+
}