<commit_before>const express = require('express');
const router = express.Router(); // eslint-disable-line new-cap

const auth = require('../auth');
const controllers = require('../controllers');
const middleware = require('../middleware');

const currentPerformance = middleware.currentPerformance;
const ensureAuthenticated = auth.ensureAuthenticated;
const ensureAdmin = auth.ensureAdmin;
const ensureAuthAndNameNumberRoute = auth.ensureAuthAndNameNumberRoute;
const ensureEligible = auth.ensureEligible;
const ensureEvalAbility = auth.ensureEvalAbility;
const passport = auth.passport;
const refreshCurrentPerformance = middleware.refreshCurrentPerformance;

const Challenges = new controllers.Challenges();
const Performances = new controllers.Performances();
const Results = new controllers.Results();
const Sessions = new controllers.Sessions();
const Spots = new controllers.Spots();
const StaticPages = new controllers.StaticPages();
const Users = new controllers.Users();

router.setup = (app) => {
  //Challenges Controller
  app.get('/performances/:performanceId/challenges/new', ensureEligible, Challenges.new);
  // app.get('/performances/:performanceId/challenges', ensureAdmin, Challenges.showAll);
  app.post('/performances/:performanceId/challenges', ensureEligible, Challenges.create);

  //Performance Controller
  app.get('/performances', ensureAuthenticated, Performances.showAll);
  app.get('/performances/new', ensureAdmin, Performances.new);
  app.post('/performances/create', ensureAdmin, Performances.create);<commit_msg>Routes: fix linting<commit_after>const express = require('express');
const router = express.Router(); // eslint-disable-line new-cap

const auth = require('../auth');
const controllers = require('../controllers');
const middleware = require('../middleware');

const currentPerformance = middleware.currentPerformance;
const ensureAuthenticated = auth.ensureAuthenticated;
const ensureAdmin = auth.ensureAdmin;
const ensureAuthAndNameNumberRoute = auth.ensureAuthAndNameNumberRoute;
const ensureEligible = auth.ensureEligible;
const ensureEvalAbility = auth.ensureEvalAbility;
const passport = auth.passport;
const refreshCurrentPerformance = middleware.refreshCurrentPerformance;

const Challenges = new controllers.Challenges();
const Performances = new controllers.Performances();
const Results = new controllers.Results();
const Sessions = new controllers.Sessions();
const StaticPages = new controllers.StaticPages();
const Users = new controllers.Users();

router.setup = (app) => {
  //Challenges Controller
  app.get('/performances/:performanceId/challenges/new', ensureEligible, Challenges.new);
  // app.get('/performances/:performanceId/challenges', ensureAdmin, Challenges.showAll);
  app.post('/performances/:performanceId/challenges', ensureEligible, Challenges.create);

  //Performance Controller
  app.get('/performances', ensureAuthenticated, Performances.showAll);
  app.get('/performances/new', ensureAdmin, Performances.new);
  app.post('/performances/create', ensureAdmin, Performances.create);
{'fraction_non_alphanumeric': 0.1227554684949396, 'fraction_numerical': 0.0, 'mean_word_length': 6.640897755610973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7510347', 'n_tokens_mistral': 869, 'n_tokens_neox': 819, 'n_words': 183}