diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-08-02 16:47:02 +0300 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-08-03 11:15:10 +0300 |
commit | b99c7f83e13d9af2227016b1a8dd684d2a85a8ab (patch) | |
tree | f3dd1815a506c55a7eb19b0284fe7e3113458a0f /appinfo | |
parent | e990e138c106009d3b688568e07765c53462eb08 (diff) |
fix the way we define the routes
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/routes.php | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index 1a3bde6..5a8fac4 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -19,28 +19,10 @@ * */ -$application = new \OCA\Survey_Client\AppInfo\Application(); - -\OCP\API::register( - 'post', - '/apps/survey_client/api/v1/report', - [$application->getContainer()->query('EndpointController'), 'sendReport'], - 'survey_client', - \OCP\API::ADMIN_AUTH -); - -\OCP\API::register( - 'post', - '/apps/survey_client/api/v1/monthly', - [$application->getContainer()->query('EndpointController'), 'enableMonthly'], - 'survey_client', - \OCP\API::ADMIN_AUTH -); - -\OCP\API::register( - 'delete', - '/apps/survey_client/api/v1/monthly', - [$application->getContainer()->query('EndpointController'), 'disableMonthly'], - 'survey_client', - \OCP\API::ADMIN_AUTH -); +return [ + 'ocs' => [ + ['name' => 'Endpoint#sendReport', 'url' => '/api/v1/report', 'verb' => 'POST'], + ['name' => 'Endpoint#enableMonthly', 'url' => '/api/v1/monthly', 'verb' => 'POST'], + ['name' => 'Endpoint#disableMonthly', 'url' => '/api/v1/monthly', 'verb' => 'DELETE'], + ], +]; |