Merge branch 'develop' of https://github.com/getmaxun/maxun into develop

This commit is contained in:
RohitR311
2024-11-09 11:03:42 +05:30
4 changed files with 14 additions and 6 deletions

View File

@@ -85,6 +85,14 @@ router.post('/login', async (req, res) => {
res.cookie('token', token, {
httpOnly: true
})
capture(
'maxun-oss-user-login',
{
email: user.email,
userId: user.id,
loggedInAt: new Date().toISOString()
}
)
res.json(user)
} catch (error: any) {
res.status(400).send(`Could not login user - ${error.message}`)