diff --git a/core/server/api/canary/notifications.js b/core/server/api/canary/notifications.js index 5137350bab..6a192471c3 100644 --- a/core/server/api/canary/notifications.js +++ b/core/server/api/canary/notifications.js @@ -55,8 +55,8 @@ module.exports = { } }, permissions: true, - query(frame) { - const allNotifications = notifications.destroy({ + async query(frame) { + const allNotifications = await notifications.destroy({ notificationId: frame.options.notification_id, user: { id: frame.user && frame.user.id diff --git a/core/server/api/v2/notifications.js b/core/server/api/v2/notifications.js index 5137350bab..6a192471c3 100644 --- a/core/server/api/v2/notifications.js +++ b/core/server/api/v2/notifications.js @@ -55,8 +55,8 @@ module.exports = { } }, permissions: true, - query(frame) { - const allNotifications = notifications.destroy({ + async query(frame) { + const allNotifications = await notifications.destroy({ notificationId: frame.options.notification_id, user: { id: frame.user && frame.user.id diff --git a/core/server/api/v3/notifications.js b/core/server/api/v3/notifications.js index 5137350bab..6a192471c3 100644 --- a/core/server/api/v3/notifications.js +++ b/core/server/api/v3/notifications.js @@ -55,8 +55,8 @@ module.exports = { } }, permissions: true, - query(frame) { - const allNotifications = notifications.destroy({ + async query(frame) { + const allNotifications = await notifications.destroy({ notificationId: frame.options.notification_id, user: { id: frame.user && frame.user.id