0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Fixed error being saved in notification settings

refs https://github.com/TryGhost/Team/issues/754

- This is fixing the root cause of an error being saved in `settings` table under `notifications` key. There needs to be a follow up to this fixing any possible instances that might have been affected byt the bug
This commit is contained in:
Naz 2021-06-03 12:54:09 +04:00
parent 71a0572f8a
commit a7dec233ba
3 changed files with 6 additions and 6 deletions

View file

@ -55,8 +55,8 @@ module.exports = {
} }
}, },
permissions: true, permissions: true,
query(frame) { async query(frame) {
const allNotifications = notifications.destroy({ const allNotifications = await notifications.destroy({
notificationId: frame.options.notification_id, notificationId: frame.options.notification_id,
user: { user: {
id: frame.user && frame.user.id id: frame.user && frame.user.id

View file

@ -55,8 +55,8 @@ module.exports = {
} }
}, },
permissions: true, permissions: true,
query(frame) { async query(frame) {
const allNotifications = notifications.destroy({ const allNotifications = await notifications.destroy({
notificationId: frame.options.notification_id, notificationId: frame.options.notification_id,
user: { user: {
id: frame.user && frame.user.id id: frame.user && frame.user.id

View file

@ -55,8 +55,8 @@ module.exports = {
} }
}, },
permissions: true, permissions: true,
query(frame) { async query(frame) {
const allNotifications = notifications.destroy({ const allNotifications = await notifications.destroy({
notificationId: frame.options.notification_id, notificationId: frame.options.notification_id,
user: { user: {
id: frame.user && frame.user.id id: frame.user && frame.user.id