From 3c9e289304f7e867d765a6756de191d90746fbea Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 17 Dec 2015 14:28:57 +0100 Subject: Handle background job generation --- appinfo/application.php | 3 ++- appinfo/routes.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'appinfo') diff --git a/appinfo/application.php b/appinfo/application.php index 44d17fe..06a466c 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -40,7 +40,8 @@ class Application extends App { $server->getRequest(), $c->query('OCA\PopularityContestClient\Collector'), $server->getHTTPClientService(), - $server->getConfig() + $server->getConfig(), + $server->getJobList() ); }); diff --git a/appinfo/routes.php b/appinfo/routes.php index 498e6d9..92f77d6 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -28,3 +28,19 @@ $application = new \OCA\PopularityContestClient\AppInfo\Application(); 'popularitycontestclient', \OCP\API::ADMIN_AUTH ); + +\OCP\API::register( + 'post', + '/apps/popularitycontestclient/api/v1/monthly', + [$application->getContainer()->query('EndpointController'), 'enableMonthly'], + 'popularitycontestclient', + \OCP\API::ADMIN_AUTH +); + +\OCP\API::register( + 'delete', + '/apps/popularitycontestclient/api/v1/monthly', + [$application->getContainer()->query('EndpointController'), 'disableMonthly'], + 'popularitycontestclient', + \OCP\API::ADMIN_AUTH +); -- cgit v1.2.3