<commit_before>'use strict';
let express = require('express');
let usersController = require('./../../controllers/users-controller');
let identity = require('./../../common/identity');

module.exports = function(app) {
  let router = express.Router();

  router
    .post('/', usersController.createUser)
    .get('/profile', usersController.getProfileInformation)
    .put('/token', usersController.loginUser);

  app.use('/api/users', router);
};
<commit_msg>Fixed the bug when getting current user information.<commit_after>'use strict';
let express = require('express');
let usersController = require('./../../controllers/users-controller');
let identity = require('./../../common/identity');

module.exports = function(app) {
  let router = express.Router();

  router
    .post('/', usersController.createUser)
    .get('/profile', identity.requiresAuthentication(), usersController.getProfileInformation)
    .put('/token', usersController.loginUser);

  app.use('/api/users', router);
};

{'fraction_non_alphanumeric': 0.18373493975903615, 'fraction_numerical': 0.0, 'mean_word_length': 4.448087431693989, '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': '4772602', 'n_tokens_mistral': 262, 'n_tokens_neox': 256, 'n_words': 58}