From 46e4cce6f9c57c5a57e140c5439be1e429b6a113 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Jan 2017 10:49:27 +0900 Subject: [PATCH] Fix bug --- src/api/private/signin.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/private/signin.ts b/src/api/private/signin.ts index 4c592d5cf..4d2cebac4 100644 --- a/src/api/private/signin.ts +++ b/src/api/private/signin.ts @@ -42,7 +42,7 @@ export default async (req: express.Request, res: express.Response) => { } // Append signin history - const inserted = await Signin.insert({ + const record = await Signin.insert({ created_at: new Date(), user_id: user._id, ip: req.ip, @@ -50,8 +50,6 @@ export default async (req: express.Request, res: express.Response) => { success: same }); - const record = inserted.ops[0]; - // Publish signin event event(user._id, 'signin', await serialize(record)); };