<commit_before>"use strict";
import Ember from 'ember';
import config from '../config/environment';

var csrfTokenRequest;

export default Ember.Object.extend({
  init: function() {
    // Since the CSRF token is used for all other backend requests, we might as
    // well fetch it immediately when the service is loaded.
    this.getCsrfToken();
  },

  getCsrfToken: function () {
    // If the CSRF request was not already created, create it.
    if (!csrfTokenRequest) {
      csrfTokenRequest = Ember.$.ajax({
        contentType: 'application/json',
        dataType: 'json',
        type: 'POST',
        url: config.bookmeisterServer + 'api/bookmeister/user/token.json'
      });
    }

    // Return the promise so it can be used by the caller.
    return csrfTokenRequest;
  }
});
<commit_msg>Stop initial fetch of CSRF token.<commit_after>import Ember from 'ember';
import config from '../config/environment';

var csrfTokenRequest;

export default Ember.Object.extend({
  getCsrfToken: function () {
    // If the CSRF request was not already created, create it.
    if (!csrfTokenRequest) {
      csrfTokenRequest = Ember.$.ajax({
        contentType: 'application/json',
        dataType: 'json',
        type: 'POST',
        url: config.bookmeisterServer + '/api/bookmeister/user/token.json'
      });
    }

    // Return the promise so it can be used by the caller.
    return csrfTokenRequest;
  }


});

{'fraction_non_alphanumeric': 0.11306179775280899, 'fraction_numerical': 0.0, 'mean_word_length': 2.8409703504043127, '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': '3729711', 'n_tokens_mistral': 425, 'n_tokens_neox': 422, 'n_words': 135}