{"size": 544, "ext": "js", "max_stars_repo_path": "app/routes/cats.server.routes.js", "max_stars_repo_name": "mwalker618/MEAN_status", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/routes/cats.server.routes.js", "max_issues_repo_name": "mwalker618/MEAN_status", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/routes/cats.server.routes.js", "max_forks_repo_name": "mwalker618/MEAN_status", "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": 27.2, "max_line_length": 70, "alphanum_fraction": 0.7058823529}
'use strict';

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

	// Cats Routes
	app.route('/cats')
		.get(cats.list)
		.post(users.requiresLogin, cats.create);

	app.route('/cats/:catId')
		.get(cats.read)
		.put(users.requiresLogin, cats.hasAuthorization, cats.update)
		.delete(users.requiresLogin, cats.hasAuthorization, cats.delete);

	// Finish by binding the Cat middleware
	app.param('catId', cats.catByID);
};
