From 8b46ca74054eb48fadb6c28fad7fb3e83855bb91 Mon Sep 17 00:00:00 2001 From: Dhanus Date: Sat, 7 Sep 2024 17:35:33 +0530 Subject: [PATCH] [fix] Tests --- .../static/openwisp-notifications/js/unsubscribe.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openwisp_notifications/static/openwisp-notifications/js/unsubscribe.js b/openwisp_notifications/static/openwisp-notifications/js/unsubscribe.js index 679506cd..71954d4a 100644 --- a/openwisp_notifications/static/openwisp-notifications/js/unsubscribe.js +++ b/openwisp_notifications/static/openwisp-notifications/js/unsubscribe.js @@ -22,14 +22,13 @@ function updateSubscription(subscribe) { statusMessage.textContent = gettext('You are currently subscribed to notifications.'); toggleBtn.textContent = gettext('Unsubscribe'); toggleBtn.setAttribute('data-hasSubscribe', 'true'); - confirmationMsg.textContent = 'Successfully subscribed!'; } else { statusMessage.textContent = gettext('You are currently unsubscribed from notifications.'); toggleBtn.textContent = gettext('Subscribe'); toggleBtn.setAttribute('data-hasSubscribe', 'false'); - confirmationMsg.textContent = 'Successfully unsubscribed!'; } + confirmationMsg.textContent = data.message; confirmationMsg.style.display = 'block'; } else { window.alert(data.message);