<commit_before>'use strict';

module.exports = function(app) {
  app.controller('AuthController', ['$http', '$location', '$window', '$log', 'auth', function($http, $location, $window, $log, auth) {
    this.hasAccount = false;
    this.signup = function(user) {

      $log.debug('$ctrl.signup');

      console.log(this.baseUrl);
      $http.post(this.baseUrl + '/signup', user)
      .then((res) => {
        auth.setToken(res.data.token);
        $http.defaults.headers.common['Authorization'] = 'Bearer ' + res.data.token;
        $location.path('/map');
      }, (err) => {
        $log.error('error in $ctrl.signup', err);
        $location.path('/home');
      });
    };
<commit_msg>debugging4<commit_after>'use strict';

module.exports = function(app) {
  app.controller('AuthController', ['$http', '$location', '$window', '$log', 'auth', function($http, $location, $window, $log, auth) {
    this.hasAccount = false;
    this.signup = function(user) {

      $log.debug('$ctrl.signup');

      $log.debug(this.baseUrl);

      $http.post(this.baseUrl + '/signup', user)
      .then((res) => {
        auth.setToken(res.data.token);
        $http.defaults.headers.common['Authorization'] = 'Bearer ' + res.data.token;
        $location.path('/map');
      }, (err) => {
        $log.error('error in $ctrl.signup', err);
        $location.path('/home');
      });
    };

{'fraction_non_alphanumeric': 0.21102248005801305, 'fraction_numerical': 0.0007251631617113851, 'mean_word_length': 2.9884393063583814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5609210', 'n_tokens_mistral': 457, 'n_tokens_neox': 451, 'n_words': 72}