<commit_before>'use strict';


// returns latest run for a user
(function() {

  var singleRun = function ($q, $resource, Authentication) {

    var runs = {
      resource :
                $resource('/runs-data/:run_user_id', {'run_user_id' : '@user_id'}, {
                  query: { method: 'GET', isArray: true },
                  create: { method: 'POST' }
                }),
      getSingleRun : function getRuns(){
                  var promise = this.resource.query({'user_id' : Authentication.user._id});
                  return promise;
                }
    };
    return runs;

  };


  angular.module('runs').factory('singleRun', ['$q', '$resource', 'Authentication', singleRun]);

}());<commit_msg>Updated single run client service to be inline with changes to server routing in recent commit<commit_after>'use strict';


// returns latest run for a user
(function() {

  var getLatestSingleData = function ($q, $resource, Authentication) {

    var runs = {
      resource :
                $resource('/api/v_' + ApplicationConfiguration.apiVersion +'/:user_id/run/data/latest',
                 {'user_id' : '@user_id'},
                 {
                    query: { method: 'GET', isArray: true },
                    create: { method: 'POST' }
                  }
                ),
      get : function get(){
                  var promise = this.resource.query({'user_id' : Authentication.user._id});
                  return promise;
                }
    };
    return runs;

  };


  angular.module('runs').factory('getLatestSingleData', ['$q', '$resource', 'Authentication', getLatestSingleData]);

}());

{'fraction_non_alphanumeric': 0.14434250764525994, 'fraction_numerical': 0.0, 'mean_word_length': 1.9799635701275045, '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': '6077224', 'n_tokens_mistral': 460, 'n_tokens_neox': 432, 'n_words': 107}