From ee286d00c361e7a9091f1c208df627a803773c08 Mon Sep 17 00:00:00 2001 From: Umar Asghar Date: Fri, 22 Mar 2019 16:49:43 +0500 Subject: [PATCH] fix visit notification non working link on Discussion page (#191) --- .../edx_notifications/js/views/notification_pane_view.js | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/edx_notifications/server/web/static/edx_notifications/js/views/notification_pane_view.js b/edx_notifications/server/web/static/edx_notifications/js/views/notification_pane_view.js index 6aa59cc8..896e12b8 100644 --- a/edx_notifications/server/web/static/edx_notifications/js/views/notification_pane_view.js +++ b/edx_notifications/server/web/static/edx_notifications/js/views/notification_pane_view.js @@ -505,10 +505,11 @@ var NotificationPaneView = Backbone.View.extend({ this.collection.url = this.mark_notification_read_endpoint + messageId; var self = this; + var csrf_token = this.getCSRFToken(); self.collection.fetch( { - headers: { - "X-CSRFToken": this.getCSRFToken() + beforeSend: function(xhr) { + xhr.setRequestHeader('X-CSRFToken', csrf_token); }, data: { "mark_as": "read" diff --git a/setup.py b/setup.py index 7dfdf6f0..68995039 100755 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def load_requirements(*requirements_paths): setup( name='edx-notifications', - version='0.7.6', + version='0.7.7', description='Notification subsystem for Open edX', long_description=open('README.md').read(), author='edX',