<commit_before>'use strict';

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

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

  app.route('/groceries/page/:page')
      .get(groceries.listPage);

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

	// Finish by binding the Grocery middleware
	app.param('groceryId', groceries.groceryByID);
};<commit_msg>changed list sort<commit_after>'use strict';

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

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

  app.route('/groceries/page/:page')
      .get(groceries.listPage);

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

	// Finish by binding the Grocery middleware
	app.param('groceryId', groceries.groceryByID);
};
{'fraction_non_alphanumeric': 0.16361071932299012, 'fraction_numerical': 0.0, 'mean_word_length': 4.744939271255061, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4107599', 'n_tokens_mistral': 504, 'n_tokens_neox': 467, 'n_words': 69}