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:
-rw-r--r--appinfo/routes.php6
-rw-r--r--js/app.js4
-rw-r--r--tests/integration/features/notifications.feature7
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'
);
diff --git a/js/app.js b/js/app.js
index 208a52a..e728971 100644
--- a/js/app.js
+++ b/js/app.js
@@ -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"