diff --git a/server/admin.api.spec.js b/server/admin.api.spec.js index c519b032b..b76e10777 100644 --- a/server/admin.api.spec.js +++ b/server/admin.api.spec.js @@ -31,10 +31,11 @@ describe('Tests for admin api', ()=>{ const inputNotification = { title : 'Test Notification', text : 'This is a test notification', - startAt : new Date(), - stopAt : new Date(), + startAt : new Date().toISOString(), + stopAt : new Date().toISOString(), dismissKey : 'testKey' - }; + }; + const savedNotification = { ...inputNotification, diff --git a/server/notifications.model.js b/server/notifications.model.js index 9da675332..302947ae1 100644 --- a/server/notifications.model.js +++ b/server/notifications.model.js @@ -43,7 +43,7 @@ NotificationSchema.statics.deleteNotification = async function(dismissKey) { if(!deletedNotification) { return { success: false, message: 'Notification not found' }; } - return { success: true, notification: deletedNotification }; + return { success: true, message: 'Notification deleted successfully' }; // Update response here } catch (err) { return { success: false, message: err.message || 'Error deleting notification' }; }