{"size": 618, "ext": "js", "max_stars_repo_path": "app/routes/sheets.server.routes.js", "max_stars_repo_name": "lehno/oaj", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/routes/sheets.server.routes.js", "max_issues_repo_name": "lehno/oaj", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/routes/sheets.server.routes.js", "max_forks_repo_name": "lehno/oaj", "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": 29.4285714286, "max_line_length": 72, "alphanum_fraction": 0.7216828479}
'use strict';
var multer = require('multer');

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

	// Sheets Routes
	app.route('/api/sheets')
		.get(sheets.list)
		.post(users.requiresLogin, sheets.create);

	app.route('/api/sheets/:sheetId')
		.get(sheets.read)
		.put(users.requiresLogin, sheets.hasAuthorization, sheets.update)
		.delete(users.requiresLogin, sheets.hasAuthorization, sheets.delete);

	// Finish by binding the Sheet middleware
	app.param('sheetId', sheets.sheetByID);
};
