{"size": 732, "ext": "js", "max_stars_repo_path": "app/routes/eventos.server.routes.js", "max_stars_repo_name": "Armando1vida/sms", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/routes/eventos.server.routes.js", "max_issues_repo_name": "Armando1vida/sms", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/routes/eventos.server.routes.js", "max_forks_repo_name": "Armando1vida/sms", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.8571428571, "max_line_length": 79, "alphanum_fraction": 0.6639344262}
'use strict';

module.exports = function (app) {
    var users = require('../../app/controllers/users.server.controller');
    var eventos = require('../../app/controllers/eventos.server.controller');

    // Eventos Routes
    app.route('/eventos')
        .get(eventos.list)
        .post(users.requiresLogin, eventos.create);	// Eventos Routes
//    app.route('/eventos/aprobados')
//        .get(eventos.list);
    app.route('/eventos/:eventoId')
        .get(eventos.read)
        .put(users.requiresLogin, eventos.hasAuthorization, eventos.update)
        .delete(users.requiresLogin, eventos.hasAuthorization, eventos.delete);

    // Finish by binding the Evento middleware
    app.param('eventoId', eventos.eventoByID);
};
