rp
04/26/2021, 4:14 AMconst createSession = async (res, userId) => {
await Session.createNewSession(res, userId);
}
const signIn = (req, res) => {
...
.signIn(email, password)
.then(async (u) => {
try {
await createNewSession(res, u.id);
res.json(u)
} catch (err) {
res.status(500).json(e)
}
});
}