From 8b95a1ef5dbf0583d5f46735f90bed362191e0a7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 18 Jan 2017 05:28:12 +0900 Subject: [PATCH] Fix bug --- src/api/common/notify.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/common/notify.ts b/src/api/common/notify.ts index c4c94ee704..9152b85cdb 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