mirror of
https://github.com/hotomoe/hotomoe
synced 2024-11-29 07:18:13 +09:00
Fix bug
This commit is contained in:
parent
a382f62071
commit
caa8aee7a0
@ -42,7 +42,7 @@ export default async (req: express.Request, res: express.Response) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Append signin history
|
// Append signin history
|
||||||
const inserted = await Signin.insert({
|
const record = await Signin.insert({
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
user_id: user._id,
|
user_id: user._id,
|
||||||
ip: req.ip,
|
ip: req.ip,
|
||||||
@ -50,8 +50,6 @@ export default async (req: express.Request, res: express.Response) => {
|
|||||||
success: same
|
success: same
|
||||||
});
|
});
|
||||||
|
|
||||||
const record = inserted.ops[0];
|
|
||||||
|
|
||||||
// Publish signin event
|
// Publish signin event
|
||||||
event(user._id, 'signin', await serialize(record));
|
event(user._id, 'signin', await serialize(record));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user