mitchell852 commented on a change in pull request #5179:
URL: https://github.com/apache/trafficcontrol/pull/5179#discussion_r582457515
##########
File path: traffic_portal/app/src/common/api/CDNService.js
##########
@@ -222,7 +222,42 @@ var CDNService = function($http, locationUtils,
messageModel, ENV) {
throw err;
}
);
- };
+ }
+
+ this.getNotifications = function(queryParams) {
+ return $http.get(ENV.api['root'] + 'cdn_notifications', { params:
queryParams }).then(
+ function(result) {
+ return result.data.response;
+ },
+ function(err) {
+ throw err;
+ }
+ );
+ };
+
+ this.createNotification = function(cdn, notification) {
+ return $http.post(ENV.api['root'] + 'cdn_notifications', { cdn:
cdn.name, notification: notification}).then(
+ function(result) {
+ return result;
+ },
+ function(err) {
+ messageModel.setMessages(err.data.alerts, false);
+ throw err;
+ }
+ );
+ };
+
+ this.deleteNotification = function(cdn) {
+ return $http.delete(ENV.api['root'] + 'cdn_notifications?cdn=' +
cdn.name).then(
Review comment:
oh right. i meant to fix that.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]