{"size": 235, "ext": "js", "max_stars_repo_path": "src/middlewares/middlewares.js", "max_stars_repo_name": "wenealves10/api-mongodb", "max_stars_repo_stars_event_min_datetime": "2020-12-31T07:07:48.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-31T07:07:48.000Z", "max_issues_repo_path": "src/middlewares/middlewares.js", "max_issues_repo_name": "wenealves10/mvc-boilerplate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/middlewares/middlewares.js", "max_forks_repo_name": "wenealves10/mvc-boilerplate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.5, "max_line_length": 47, "alphanum_fraction": 0.5744680851}
exports.csurfError = (err, req, res, next) =>{
    if(err && 'EBADCSRFTOKEN' === err.code){
        res.render('ERROR');
    }
}

exports.csurfMiddleware = (req, res, next) => {
    res.locals.csrfToken = req.csrfToken();
    next();
}