diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-11-19 12:01:22 +0300 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-11-19 12:14:51 +0300 |
commit | 940fbe4fddddfc4094ef19586c5835f6d848f436 (patch) | |
tree | 23f44c8f3b11c284b6d24ee05e5366ad50d46d10 | |
parent | bfb0166a2531eee4fdbfff9247cc37d6ee4e15fa (diff) |
Change the OCS url to the known pattern
-rw-r--r-- | appinfo/routes.php | 6 | ||||
-rw-r--r-- | js/app.js | 4 | ||||
-rw-r--r-- | tests/integration/features/notifications.feature | 7 |
3 files changed, 8 insertions, 9 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index cca13bf..1352ec3 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -23,19 +23,19 @@ $application = new \OCA\Notifications\AppInfo\Application(); \OCP\API::register( 'get', - '/notifications/v1', + '/apps/notifications/v1/notifications', [$application->getContainer()->query('EndpointController'), 'listNotifications'], 'notifications' ); \OCP\API::register( 'get', - '/notifications/v1/{id}', + '/apps/notifications/v1/notifications/{id}', [$application->getContainer()->query('EndpointController'), 'getNotification'], 'notifications' ); \OCP\API::register( 'delete', - '/notifications/v1/{id}', + '/apps/notifications/v1/notifications/{id}', [$application->getContainer()->query('EndpointController'), 'deleteNotification'], 'notifications' ); @@ -78,7 +78,7 @@ $notification.fadeOut(OC.menuSpeed); $.ajax({ - url: OC.linkToOCS('notifications', 2) + 'v1/' + id + '?format=json', + url: OC.linkToOCS('apps/notifications/v1', 2) + 'notifications/' + id + '?format=json', type: 'DELETE', success: function(data) { self._removeNotification(id); @@ -281,7 +281,7 @@ fetch: function(success, failure){ var self = this; var request = $.ajax({ - url: OC.linkToOCS('notifications', 2) + 'v1?format=json', + url: OC.linkToOCS('/apps/notifications/v1', 2) + 'notifications?format=json', type: 'GET' }); diff --git a/tests/integration/features/notifications.feature b/tests/integration/features/notifications.feature index bf456e6..cd16332 100644 --- a/tests/integration/features/notifications.feature +++ b/tests/integration/features/notifications.feature @@ -1,12 +1,11 @@ Feature: notifications Background: - Given using api version "1" + Given using api version "2" Scenario: Read notifications without Notifiers Given user "test1" exists Given As an "test1" - When sending "GET" to "/notifications/v1" - Then the HTTP status code should be "200" + When sending "GET" to "/apps/notifications/v1/notifications" # "204 No Content" - Because there is no notifier - And the OCS status code should be "204" + Then the HTTP status code should be "204" |