<commit_before>angular.module('bxSession.session', [])

.service 'bxSession', [
  '$rootScope', '$http', '$q'
  ($rootScope, $http, $q)->
    session = null
    authenticated = false
    scope = null

    # TODO: emit error object
    onError = () ->
      session = null
      authenticated = false

    api =
      login: '/api/login'
      logout: '/api/logout'
      signup: '/api/signup'
      session: '/api/session'

    loadSession = (override) ->
      deferred = $q.defer()
      promise = deferred.promise

      if !session or override
        $http.get(api.session)<commit_msg>debugging bxSession<commit_after>angular.module('bxSession.session', [])

.service 'bxSession', [
  '$rootScope', '$http', '$q'
  ($rootScope, $http, $q)->
    session = null
    authenticated = false
    scope = $rootScope

    # TODO: emit error object
    onError = () ->
      session = null
      authenticated = false

    api =
      login: '/api/login'
      logout: '/api/logout'
      signup: '/api/signup'
      session: '/api/session'

    loadSession = (override) ->
      deferred = $q.defer()
      promise = deferred.promise

      if !session or override
        $http.get(api.session)
{'fraction_non_alphanumeric': 0.14848993288590603, 'fraction_numerical': 0.0, 'mean_word_length': 2.3700564971751414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5820641', 'n_tokens_mistral': 391, 'n_tokens_neox': 373, 'n_words': 88}