<commit_before>var apiURL = 'http://localhost:8080/persenk-ultra/api/';

var persenkUltraServices = angular.module('persenkUltraServices', [ 'ngResource' ]);

persenkUltraServices.factory('AidStation', function($resource) {
	return $resource(apiURL + 'stations/', {}, {
		'query' : {
			method : 'GET',
			isArray : true
		}
	});
})

persenkUltraServices.factory('Runners', function($resource) {
	return $resource(apiURL + 'runners/', {}, {
		'query' : {
			method : 'GET',
			isArray : true
		}
	})
});

var persenkUltraControllers = angular.module('persenkUltra', [ 'persenkUltraServices' ]);

persenkUltraControllers.controller('AidStationController', [ '$scope', 'AidStation', function($scope, AidStation) {
	$scope.aidStations = AidStation.query();
} ]);

persenkUltraControllers.controller('RunnerController', ['$scope', 'Runners', function($scope, Runners) {
	$scope.runners = Runners.query();
} ]);<commit_msg>Changed the way Runners and AidStations are GET from the API<commit_after>"use strict"
var apiURL = 'http://localhost:8080/persenk-ultra/api/';

var persenkUltraServices = angular.module('persenkUltraServices', [ 'ngResource' ]);

persenkUltraServices.factory('AidStationFactory', [ '$http', function($http) {
	this.getAidStations = function() {
		return $http.get(apiURL + 'stations');
	};

	return this;
} ]);

persenkUltraServices.factory('RunnerFactory', [ '$http', function($http) {
	this.getRunners = function() {
		return $http.get(apiURL + 'runners');
	}
	
	return this;
} ]);

var persenkUltra = angular.module('persenkUltra', [ 'persenkUltraServices' ]);

persenkUltra.controller('AidStationController', [ '$scope', 'AidStationFactory', function($scope, AidStationFactory) {

	$scope.getAidStations = function() {
		AidStationFactory.getAidStations()
		.success(function(stations) {
			$scope.aidStations = stations;
		}).error(function(errorMessage) {
			console.log(errorMessage);
			$scope.status = "Unable to load aid station data: " + errorMessage;
		});
	}

	$scope.getAidStations();

} ]);

persenkUltra.controller('RunnerController', [ '$scope', 'RunnerFactory', function($scope, RunnerFactory) {
	$scope.getRunners = function() {
		RunnerFactory.getRunners()
		.success(function(runners) {
			$scope.runners = runners;
		})
		.error(function(errorMessage) {
			console.log(errorMessage);
			$scope.status = "Unable to load aid station data: " + errorMessage;
		});
	}
	
	$scope.getRunners();

} ]);
{'fraction_non_alphanumeric': 0.16878850102669404, 'fraction_numerical': 0.0032854209445585215, 'mean_word_length': 5.583783783783784, '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': '2629483', 'n_tokens_mistral': 899, 'n_tokens_neox': 829, 'n_words': 132}