'use strict';

module.exports = function(app) {
	// Routing logic   
	var categories = require('../../app/controllers/categories.server.controller');

	app.route('/categories')
		.get(categories.list)
		.post(categories.create);

	app.route('/categories/:categoryId')
		.get(categories.read)
		.put(categories.update)
		.delete(categories.delete);

	app.param('categoryId', categories.categoryById);
};
@@ -142,16 +142,87 @@
 oller');
+%0A%09var users = require('../../app/controllers/users.server.controller');
 %0A%0A%09app.r
@@ -273,16 +273,37 @@
 %09%09.post(
+users.requiresLogin, 
 categori
@@ -384,16 +384,37 @@
 %0A%09%09.put(
+users.requiresLogin, 
 categori
@@ -434,16 +434,37 @@
 .delete(
+users.requiresLogin, 
 categori

Add authentication