const verifyFirstTimeUser = async (req, res, next) => {
    try {
        if(req.user.first_login = false)
            res.redirect("/user/get-started")
    next()
       
    } catch (e) {
        return res.redirect("/student-login", {
            error: {
                statusCode: "401",
                success: false,
                message: "Error",
                error: e.message
            },
            success: {
                statusCode: "200",
                success: false,
                message: undefined,
        }
        })  
    }

}

module.exports = verifyFirstTimeUser