Skip to content
Snippets Groups Projects
Commit caa8aee7 authored by syuilo's avatar syuilo
Browse files

Fix bug

parent a382f620
No related merge requests found
......@@ -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));
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment