<commit_before>var express = require('express');
var router = express.Router();

// this file deals with all paths starting /version_x
var folder = "version_2";

// add your routes here
// River permissions prototype version 2


// Start

// Have you called us to check the location of your activity?                   /version_2/start/check_location
// ###  location_check_no = Contact the Environment Agency                      /version_2/contact/contact_ea
// ###  location_check_yes = Add the exemptions you want to register            /version_2/exemptions/add_exemptions

router.post('/start/check_location', function (req,res) {
  if (req.body['location_check']==="location_check_no"){
    res.redirect( '/' + folder + '/contact/contact_ea_location');
  } else if (req.body['location_check']==="location_check_yes") {
    res.redirect( '/' + folder + '/location/grid_reference');
  }
});

// Where will the exemption activity take place?                                /version_2/location/grid_reference

router.post('/location/grid_reference', function(req, res) {
  res.redirect( '/' + folder + '/exemptions/add_exemptions');
});

// Add the exemptions you want to register                                      /version_2/exemptions/add_exemptions

router.post('/exemptions/add_exemptions', function(req, res) {
  res.redirect( '/' + folder + '/exemptions/check_exemptions');
});

// Check your exemptions                                                        /version_2/exemptions/check_exemptions

router.post('/exemptions/check_exemptions', function(req, res) {
  res.redirect( '/' + folder + '/user_type/user_type');
});


// Who is legally responsible for the activity?                                 /version_2/user_type/user_type

// ###  public = What’s the name of the local authority or public body?         /version_2/user_type/local_authority
// Route to relevant business type journey

router.post('/user_type/user_type', function (req,res) {
  if (req.body['radio-inline-group']==="local_authority"){
    res.redirect( '/' + folder + '/user_type/local_authority');
  }
  if (req.body['radio-inline-group']==="limited_company"){
    res.redirect( '/' + folder + '/user_type/limited_company_number');
  }
  if (req.body['radio-inline-group']==="limited_liability"){
    res.redirect( '/' + folder + '/user_type/limited_liability_number');
  }
  if (req.body['radio-inline-group']==="individual"){
    res.redirect( '/' + folder + '/user_type/individual_name');
  }
  if (req.body['radio-inline-group']==="partnership"){
    res.redirect( '/' + folder + '/user_type/partnership');
  }
  if (req.body['radio-inline-group']==="other"){<commit_msg>Swapped location and add exemptions in routing<commit_after>var express = require('express');
var router = express.Router();

// this file deals with all paths starting /version_x
var folder = "version_2";

// add your routes here
// River permissions prototype version 2


// Start

// Have you called us to check the location of your activity?                   /version_2/start/check_location
// ###  location_check_no = Contact the Environment Agency                      /version_2/contact/contact_ea
// ###  location_check_yes = Add the exemptions you want to register            /version_2/exemptions/add_exemptions

router.post('/start/check_location', function (req,res) {
  if (req.body['location_check']==="location_check_no"){
    res.redirect( '/' + folder + '/contact/contact_ea_location');
  } else if (req.body['location_check']==="location_check_yes") {
    res.redirect( '/' + folder + '/exemptions/add_exemptions');
  }
});

// Add the exemptions you want to register                                      /version_2/exemptions/add_exemptions

router.post('/exemptions/add_exemptions', function(req, res) {
  res.redirect( '/' + folder + '/exemptions/check_exemptions');
});

// Check your exemptions                                                        /version_2/exemptions/check_exemptions

router.post('/exemptions/check_exemptions', function(req, res) {
  res.redirect( '/' + folder + '/location/grid_reference');
});

// Where will the exemption activity take place?                                /version_2/location/grid_reference

router.post('/location/grid_reference', function(req, res) {
  res.redirect( '/' + folder + '/user_type/user_type');
});


// Who is legally responsible for the activity?                                 /version_2/user_type/user_type

// ###  public = What’s the name of the local authority or public body?         /version_2/user_type/local_authority
// Route to relevant business type journey

router.post('/user_type/user_type', function (req,res) {
  if (req.body['radio-inline-group']==="local_authority"){
    res.redirect( '/' + folder + '/user_type/local_authority');
  }
  if (req.body['radio-inline-group']==="limited_company"){
    res.redirect( '/' + folder + '/user_type/limited_company_number');
  }
  if (req.body['radio-inline-group']==="limited_liability"){
    res.redirect( '/' + folder + '/user_type/limited_liability_number');
  }
  if (req.body['radio-inline-group']==="individual"){
    res.redirect( '/' + folder + '/user_type/individual_name');
  }
  if (req.body['radio-inline-group']==="partnership"){
    res.redirect( '/' + folder + '/user_type/partnership');
  }
  if (req.body['radio-inline-group']==="other"){
{'fraction_non_alphanumeric': 0.15123859191655803, 'fraction_numerical': 0.003725088470851183, 'mean_word_length': 3.1023682200152787, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1253107', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1575, 'n_words': 329}