Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-05 16:00:58 +0300
committerJoas Schilling <coding@schilljs.com>2016-09-05 16:28:45 +0300
commit09e8c84e2b70c3bf07ea14a3d1a6a2b2c9ff51bb (patch)
treeb50b831e532b0ae568f491e017e4d88b4617d01b /appinfo
parent32fa28dddbb480d0a5d86612c80178ec4ef34a8a (diff)
Use the new OCS controller
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/routes.php27
1 files changed, 7 insertions, 20 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php
index b63aefd..fca8e84 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -19,23 +19,10 @@
*
*/
-$application = new \OCA\Notifications\AppInfo\Application();
-
-\OCP\API::register(
- 'get',
- '/apps/notifications/api/v1/notifications',
- [$application->getContainer()->query('EndpointController'), 'listNotifications'],
- 'notifications'
-);
-\OCP\API::register(
- 'get',
- '/apps/notifications/api/v1/notifications/{id}',
- [$application->getContainer()->query('EndpointController'), 'getNotification'],
- 'notifications'
-);
-\OCP\API::register(
- 'delete',
- '/apps/notifications/api/v1/notifications/{id}',
- [$application->getContainer()->query('EndpointController'), 'deleteNotification'],
- 'notifications'
-);
+return [
+ 'ocs' => [
+ ['name' => 'Endpoint#listNotifications', 'url' => '/api/v1/notifications', 'verb' => 'GET'],
+ ['name' => 'Endpoint#getNotification', 'url' => '/api/v1/notifications/{id}', 'verb' => 'GET'],
+ ['name' => 'Endpoint#deleteNotification', 'url' => '/api/v1/notifications/{id}', 'verb' => 'DELETE'],
+ ],
+];