You should change it to the following please: ``` ...
# support-questions
r
You should change it to the following please:
Copy code
const createSession = async (res, userId) => {
    try {
        console.log(userId)
        let session = await Session
            .createNewSession(res, userId);
        console.log(session);
    } catch (error) {
        console.log(error);
        throw error
    }
}
Copy code
const signIn = (req, res) => {
    const { email, password } = req.body
        ThirdPartyEmailPassword
            .signIn(email, password)
            .then(async u => {
                try {
                  await createSession(res, u.id)
                  res.json(u)
                } catch (err) {
                  res.status(500).json(e.message)
                }
            }).catch(error => {
              res.status(500).json(error)
            })
}