Fixed notifications api user for internal context

refs #12537

- Fix after a refactor introduced in 935ffdd0f6
This commit is contained in:
Naz 2021-01-14 17:49:55 +13:00
parent 935ffdd0f6
commit cc9d987e94
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ module.exports = {
query(frame) {
return notifications.browse({
user: {
id: frame.user.id
id: frame.user && frame.user.id
}
});
}
@ -57,7 +57,7 @@ module.exports = {
const allNotifications = notifications.destroy({
notificationId: frame.options.notification_id,
user: {
id: frame.user.id
id: frame.user && frame.user.id
}
});

View File

@ -10,7 +10,7 @@ module.exports = {
query(frame) {
return notifications.browse({
user: {
id: frame.user.id
id: frame.user && frame.user.id
}
});
}
@ -57,7 +57,7 @@ module.exports = {
const allNotifications = notifications.destroy({
notificationId: frame.options.notification_id,
user: {
id: frame.user.id
id: frame.user && frame.user.id
}
});