<commit_before>'use strict';

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

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

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

  // Finish by binding the Vocab middleware
  app.param('vocabId', vocabs.vocabByID);
};<commit_msg>Adds a route for updating multiple vocabs<commit_after>'use strict';

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

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

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

  app.route('/vocabs/updateMultiple')
    .put(users.requiresLogin, vocabs.updateMultiple);
  // Finish by binding the Vocab middleware
  app.param('vocabId', vocabs.vocabByID);
};
{'fraction_non_alphanumeric': 0.1656441717791411, 'fraction_numerical': 0.0, 'mean_word_length': 4.09765625, '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': '2117276', 'n_tokens_mistral': 459, 'n_tokens_neox': 449, 'n_words': 71}