Skip to content

Commit c16b203

Browse files
committed
[chore] Remove unused
1 parent ef19db3 commit c16b203

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

openwisp_notifications/static/openwisp-notifications/js/preferences.js

-23
Original file line numberDiff line numberDiff line change
@@ -251,29 +251,6 @@ if (typeof gettext === 'undefined') {
251251
});
252252
}
253253

254-
function updateIndividualSetting(settingId, isWebChecked, isEmailChecked) {
255-
const userId = $('.settings-container').data('user-id');
256-
const data = {
257-
web: isWebChecked,
258-
email: isEmailChecked
259-
};
260-
$.ajax({
261-
type: 'PATCH',
262-
url: '/api/v1/notifications/user/' + userId + '/user-setting/' + settingId + '/',
263-
headers: { 'X-CSRFToken': $('input[name="csrfmiddlewaretoken"]').val() },
264-
contentType: 'application/json',
265-
data: JSON.stringify(data),
266-
success: function () {
267-
showToast('success', gettext('Settings updated successfully.'));
268-
},
269-
error: function () {
270-
showToast('error', gettext('Something went wrong. Please try again.'));
271-
$(`.web-checkbox[data-pk="${settingId}"]`).prop('checked', !isWebChecked);
272-
$(`.email-checkbox[data-pk="${settingId}"]`).prop('checked', !isEmailChecked);
273-
}
274-
});
275-
}
276-
277254
function updateOrgLevelCheckboxes(organizationId) {
278255
const webCheckboxes = $('.web-checkbox[data-organization-id="' + organizationId + '"]');
279256
const emailCheckboxes = $('.email-checkbox[data-organization-id="' + organizationId + '"]');

0 commit comments

Comments
 (0)