{"size": 1015, "ext": "js", "max_stars_repo_path": "lib/routes/user.js", "max_stars_repo_name": "pabloibanezcom/node-express-mongodb", "max_stars_repo_stars_event_min_datetime": "2017-12-06T21:07:41.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-01T12:48:19.000Z", "max_issues_repo_path": "lib/routes/user.js", "max_issues_repo_name": "pabloibanezcom/node-express-mongodb.api", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/routes/user.js", "max_forks_repo_name": "pabloibanezcom/node-express-mongodb.api", "max_forks_repo_forks_event_min_datetime": "2019-04-24T14:05:00.000Z", "max_forks_repo_forks_event_max_datetime": "2019-04-24T14:05:00.000Z"}
{"max_stars_count": 6, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 35.0, "max_line_length": 98, "alphanum_fraction": 0.6285714286}
const routesService = require('../services/routes.service');
const login_config = require('../auth/config/login');
const signup_config = require('../auth/config/signup');

module.exports = (app, passport) => {
    app.get(login_config.url,
        passport.authenticate('local-login', { session: false }),
        (req, res, aux) => {
            res.status(req.user.statusCode).send(req.user.result);
        }
    );
    routesService.storeRoute(app, {
        group: 'User', model: 'User', name: 'Login', method: 'GET', url: login_config.url,
        custom_postman_request: login_config.custom_request, test_script: login_config.test_script
    });

    app.post(signup_config.url, passport.authenticate('local-signup', {}),
        (req, res, aux) => {
            res.status(200).send();
        }
    );
    routesService.storeRoute(app, {
        group: 'User', model: 'User', name: 'SignUp', method: 'POST', url: signup_config.url,
        custom_postman_request: signup_config.custom_request
    });
};


