{"size": 600, "ext": "js", "max_stars_repo_path": "app/routes/sectors.server.routes.js", "max_stars_repo_name": "ronnyp07/eLap", "max_stars_repo_stars_event_min_datetime": "2019-05-27T13:04:02.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-27T13:04:02.000Z", "max_issues_repo_path": "app/routes/sectors.server.routes.js", "max_issues_repo_name": "ronnyp07/eLap", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/routes/sectors.server.routes.js", "max_forks_repo_name": "ronnyp07/eLap", "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": 31.5789473684, "max_line_length": 77, "alphanum_fraction": 0.72}
'use strict';

module.exports = function(app) {
	var users = require('../../app/controllers/user.server.controller');
    var sectors = require('../../app/controllers/sectors.server.controller');
	// Sectors Routes
	app.route('/sector')
		.get(sectors.list)
	 	.post(users.requiresLogin, sectors.create);

	 app.route('/sector/:sectorId')
		.get(sectors.read)
	 	.put(users.requiresLogin, sectors.hasAuthorization, sectors.update)
	 	.delete(users.requiresLogin, sectors.hasAuthorization, sectors.delete);

	 // Finish by binding the Sector middleware
	 app.param('sectorId', sectors.sectorByID);
};
