diff --git a/src/api/common/notify.ts b/src/api/common/notify.ts index c4c94ee70..9152b85cd 100644 --- a/src/api/common/notify.ts +++ b/src/api/common/notify.ts @@ -14,7 +14,7 @@ export default ( } // Create notification - const res = await Notification.insert(Object.assign({ + const notification = await Notification.insert(Object.assign({ created_at: new Date(), notifiee_id: notifiee, notifier_id: notifier, @@ -22,8 +22,6 @@ export default ( is_read: false }, content)); - const notification = res.ops[0]; - resolve(notification); // Publish notification event