<commit_before>var users = require('./../controllers/users.controllers');
var restrict = require('./../../config/db-config').secret;
var expressJWT = require('express-jwt');

module.exports = function(router) {
  router
    .route('/signup')
    .post(users.signUp);

  router
    .route('/login')
    .post(users.login);

  router
    .route('/users')
    .get(users.getAllUsers);

  router
    .route('/:username')
    .get(expressJWT({secret: restrict}), users.getOneUser)
    .put(expressJWT({secret: restrict}), users.updateOneUser)
    .delete(expressJWT({secret: restrict}), users.deleteUser);

  router
    .route('/user/:username')
    .get(users.getOneUser);

};<commit_msg>add routes for validation, logout. more to come, maybe...<commit_after>var users = require('./../controllers/users.controllers');
var restrict = require('./../../config/db-config').secret;
var expressJWT = require('express-jwt');

module.exports = function(router) {
  router
    .route('/signup')
    .post(users.signUp);

  router
    .route('/login')
    .post(users.login);

  router
    .route('/auth')
    .get(users.auth);

  /*router
    .route('/logout')
    .get(users.logout);*/

  router
    .route('/users')
    .get(users.getAllUsers);

  router
    .route('/:username')
    .get(expressJWT({secret: restrict}), users.getOneUser)
    .put(expressJWT({secret: restrict}), users.updateOneUser)
    .delete(expressJWT({secret: restrict}), users.deleteUser);

  router
    .route('/user/:username')
    .get(users.getOneUser);

};
{'fraction_non_alphanumeric': 0.19291338582677164, 'fraction_numerical': 0.0, 'mean_word_length': 3.394812680115274, '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': '5253615', 'n_tokens_mistral': 496, 'n_tokens_neox': 487, 'n_words': 82}