<commit_before>var app = angular.module('nbaRoutes');

app.service('teamService', function($http, $q){

this.addNewGame = function(gameObj){
		var url = 'https://api.parse.com/1/classes/' + gameObj.homeTeam;
		
		parseInt(gameObj.homeTeamScore);
		parseInt(gameObj.opponentScore);
		
		if(gameObj.homeTeamScore > gameObj.opponentScore){
			gameObj.won = true;
		}else{
			gameObj.won = false;
		}
		$http.post('url', data)
			return data;
		}	
		
		
this.getTeamData = function(team){
		var deferred = $q.defer()
		var url = 'https://api.parse.com/1/classes/' + team;
		$http.get('url')
		.then(function(data){
			var results = data.data.results
			var wins = 0;
			var losses = 0;
			results.forEach(input, function(){
				if(data.data.won === true){
					deferred.resolve(wins++);
				}else {
					deferred.reject(losses++);
				}
				results.wins = wins;
				results.losses = losses;
			})
		})
		return deferred.promise
	}	
});<commit_msg>Service adjustments<commit_after>var app = angular.module('nbaRoutes');

app.service('teamService', function($http, $q){

this.addNewGame = function(gameObj){
		var url = 'https://api.parse.com/1/classes/' + gameObj.homeTeam;
		
		parseInt(gameObj.homeTeamScore);
		parseInt(gameObj.opponentScore);
		
		if(gameObj.homeTeamScore > gameObj.opponentScore){
			gameObj.won = true;
		}else{
			gameObj.won = false;
		}
		$http.post('url', data)
			return data;
		}	
		
		
this.getTeamData = function(team){
		var deferred = $q.defer()
		var url = 'https://api.parse.com/1/classes/' + team;
		$http.get('url')
		.then(function(data){
			var results = data.data.results
			var wins = 0;
			var losses = 0;
			results.forEach(input, function(){
				if(data.data.won === true){
					deferred.resolve(wins++);
				}else {
					deferred.reject(losses++);
				}
				results.wins = wins;
				results.losses = losses;
			})
		})
		console.log (this.getTeamData)
		return this.getTeamData	
		return deferred.promise
	}
	
});
{'fraction_non_alphanumeric': 0.1633384536610343, 'fraction_numerical': 0.00409626216077829, 'mean_word_length': 3.2945054945054943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '1743858', 'n_tokens_mistral': 831, 'n_tokens_neox': 696, 'n_words': 121}