<commit_before>students.$inject = ['$http'];

function students ($http) {
	const url = 'http://fiasps.unitec.edu:' + PORT + '/api/Students';

	const service = {
		get: get,
		getHours: getHours,
		getAccountId: getAccountId,
		getSectionHours: getSectionHours
	};

	return service;

	function get (successCallback, errorCallback) {
        $http.get(url).then(successCallback)
            .catch(errorCallback);
	}

	function getHours(accountId, successCallback, errorCallback) {
		$http.get(url + '/' + accountId + '/Hour').then(successCallback)
			.catch(errorCallback);

		// return $http.get(url + '/' + accountId + '/Hour').then(function(response) {
		// 	return response.data;
		// });
	}

	function getAccountId(successCallback, errorCallback){
				$http.get(url + '/Me').then(successCallback)
						.catch(errorCallback);
	}

	function getSectionHours(accountId, successCallback, errorCallback){
				$http.get(url + '/'+accountId+'/SectionHours').then(successCallback)
						.catch(errorCallback);
	}

}

module.exports = { name: 'students', srvc: students };
<commit_msg>Get parsed excel API call<commit_after>students.$inject = ['$http', '$q'];

function students ($http, $q) {
	const url = 'http://fiasps.unitec.edu:' + PORT + '/api/Students';

	const service = {
		get: get,
		getHours: getHours,
		getAccountId: getAccountId,
		getSectionHours: getSectionHours,
		getParsedStudentsExcel: getParsedStudentsExcel
	};

	return service;

	function get (successCallback, errorCallback) {
        $http.get(url).then(successCallback)
            .catch(errorCallback);
	}

	function getHours(accountId, successCallback, errorCallback) {
		$http.get(url + '/' + accountId + '/Hour').then(successCallback)
			.catch(errorCallback);

		// return $http.get(url + '/' + accountId + '/Hour').then(function(response) {
		// 	return response.data;
		// });
	}

	function getAccountId(successCallback, errorCallback){
				$http.get(url + '/Me').then(successCallback)
						.catch(errorCallback);
	}

	function getSectionHours(accountId, successCallback, errorCallback){
				$http.get(url + '/'+accountId+'/SectionHours').then(successCallback)
						.catch(errorCallback);
	}

	function getParsedStudentsExcel (data) {
		const deferred = $q.defer();

      	$http.get(url+'/Parse/'+data)
	        .success(response => { deferred.resolve(response.data); })
	        .error(reject => { deferred.reject('No se pudo importar el archivo.'); });

	    return deferred.promise;
	}

}

module.exports = { name: 'students', srvc: students };

{'fraction_non_alphanumeric': 0.15849802371541502, 'fraction_numerical': 0.0, 'mean_word_length': 3.982283464566929, 'pattern_counts': {'":': 0, '<': 3, '<?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': '519211', 'n_tokens_mistral': 899, 'n_tokens_neox': 810, 'n_words': 146}