<commit_before>exports = module.exports = function ($stateProvider, $urlRouterProvider) {
  $urlRouterProvider.otherwise('/torrents');

  function isLogged ($state, $q, user) {
    return user.isLogged().catch(function () {
      return $state.go('login');
    });
  }
  isLogged.$inject = ['$state', '$q', 'user'];

  $stateProvider
  .state('login', {
    url: '/login',
    views: {
      '': {
        templateUrl: 'user/login.tpl.html',
        controller: 'loginCtrl as login'
      }
    }
  })
  .state('home', {
    abstract: true,
    url: '',
    views: {
      navbar: {
        controller: 'navbarCtrl as navbar',
        templateUrl: 'navbar/logged.tpl.html'
      },
      '': {
        template: '<ui-view/>',
        resolve: {
          isLogged: isLogged
        }
      }<commit_msg>minus one XHR on login<commit_after>exports = module.exports = function ($stateProvider, $urlRouterProvider) {
  $urlRouterProvider.otherwise('/torrents');

  function isLogged ($state, $q, user) {
    if (user.status.logged) return $q.resolve();
    return user.isLogged().catch(function () {
      return $state.go('login');
    });
  }
  isLogged.$inject = ['$state', '$q', 'user'];

  $stateProvider
  .state('login', {
    url: '/login',
    views: {
      '': {
        templateUrl: 'user/login.tpl.html',
        controller: 'loginCtrl as login'
      }
    }
  })
  .state('home', {
    abstract: true,
    url: '',
    views: {
      navbar: {
        controller: 'navbarCtrl as navbar',
        templateUrl: 'navbar/logged.tpl.html'
      },
      '': {
        template: '<ui-view/>',
        resolve: {
          isLogged: isLogged
        }
      }
{'fraction_non_alphanumeric': 0.17247596153846154, 'fraction_numerical': 0.0, 'mean_word_length': 2.251953125, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3712051', 'n_tokens_mistral': 549, 'n_tokens_neox': 539, 'n_words': 102}