diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-17 10:49:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-17 10:49:27 +0900 |
| commit | caa8aee7a02173174287f9571ce22557807efbe6 (patch) | |
| tree | 7fccda4cf49c75e68bb6b9e2b36cc943d0ce834a /src/api/private | |
| parent | [WIP] test (diff) | |
| download | sharkey-caa8aee7a02173174287f9571ce22557807efbe6.tar.gz sharkey-caa8aee7a02173174287f9571ce22557807efbe6.tar.bz2 sharkey-caa8aee7a02173174287f9571ce22557807efbe6.zip | |
Fix bug
Diffstat (limited to 'src/api/private')
| -rw-r--r-- | src/api/private/signin.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/private/signin.ts b/src/api/private/signin.ts index 4c592d5cfa..4d2cebac40 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)); }; |