<commit_before>var controller = require('../controller');

module.exports = [{
  method: 'DELETE',
  path: '/users/{id}',
  config: {
    handler: controller.delete.bind(controller),
    description: 'Delete a user object based on `id`.'
  }
}];
<commit_msg>add params validation to DELETE /users<commit_after>var controller = require('../controller');
var Joi = require('joi');
var Errors = require('../../../classes/errors');

module.exports = [{
  method: 'DELETE',
  path: '/users/{id}',
  config: {
    handler: controller.delete.bind(controller),
    description: 'Delete a user object based on `id`.',
    validate: {
      params: {
        id: Joi.number().integer().required()
      },
      failAction: Errors.id
    }
  }
}];

{'fraction_non_alphanumeric': 0.18292682926829268, 'fraction_numerical': 0.0, 'mean_word_length': 3.222857142857143, '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': '5266629', 'n_tokens_mistral': 225, 'n_tokens_neox': 226, 'n_words': 55}