diff options
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'], + ], +]; |