Преглед изворни кода

fix: update notification response handling to check for 'success' status

Manuel пре 8 месеци
родитељ
комит
9ad264ceea
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      templates/all_notifications.html

+ 2 - 2
templates/all_notifications.html

@@ -398,7 +398,7 @@ document.addEventListener('DOMContentLoaded', function() {
             return response.json();
         })
         .then(data => {
-            if (data.success) {
+            if (data.success || data.status === 'success') {
                 // Actualizar contador en el header
                 document.getElementById('unread-count').textContent = data.unread_count;
                 
@@ -447,7 +447,7 @@ document.addEventListener('DOMContentLoaded', function() {
             return response.json();
         })
         .then(data => {
-            if (data.success) {
+            if (data.success || data.status === 'success') {
                 // Recargar notificaciones
                 loadNotifications(currentPage);