<commit_before>'use strict';

/**
 * Module dependencies
 */
var pollsPolicy = require('../policies/polls.server.policy'),
  polls = require('../controllers/polls.server.controller');

module.exports = function(app) {
  // Polls Routes
  app.route('/api/polls').all(pollsPolicy.isAllowed)
    .get(polls.list)
    .post(polls.create);

  app.route('/api/polls/:pollId').all(pollsPolicy.isAllowed)
    .get(polls.read)
    .put(polls.update)
    .delete(polls.delete);

  app.route('/api/findOpts/:pollId').get(polls.findOpts);
  app.route('/api/findCmts/:pollId').get(polls.findCmts);
  app.route('/api/findTags/:pollId').get(polls.findTags);
  app.route('/api/findVotes/:pollId').get(polls.findVotes);
  app.route('/api/findOwnerVote/:pollId').get(polls.findOwnerVote);
  app.route('/api/findVoteopts/:pollId').get(polls.findVoteCalc);

  // Finish by binding the Poll middleware
  app.param('pollId', polls.pollByID);
};<commit_msg>Commited from lenh at 2017年 6月 21日 水曜日 10:50:19<commit_after>'use strict';

/**
 * Module dependencies
 */
var pollsPolicy = require('../policies/polls.server.policy'),
  polls = require('../controllers/polls.server.controller');

module.exports = function(app) {
  // Polls Routes
  app.route('/api/polls').all(pollsPolicy.isAllowed)
    .get(polls.list)
    .post(polls.create);

  app.route('/api/polls/:pollId').all(pollsPolicy.isAllowed)
    .get(polls.read)
    .put(polls.update)
    .delete(polls.delete);

  app.route('/api/findOpts/:pollId').get(polls.findOpts);
  app.route('/api/findCmts/:pollId').get(polls.findCmts);
  app.route('/api/findTags/:pollId').get(polls.findTags);
  app.route('/api/findVotes/:pollId').get(polls.findVotes);
  app.route('/api/findOwnerVote/:pollId').get(polls.findOwnerVote);
  app.route('/api/findVoteopts/:pollId').get(polls.findVoteopts);

  // Finish by binding the Poll middleware
  app.param('pollId', polls.pollByID);
};
{'fraction_non_alphanumeric': 0.19558359621451105, 'fraction_numerical': 0.006834910620399579, 'mean_word_length': 4.390934844192635, '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': '7552178', 'n_tokens_mistral': 727, 'n_tokens_neox': 728, 'n_words': 76}