<commit_before>/*
 * @author <NAME>
 */

kurento_room.controller('newTeamController', function ($scope, $window, serviceUser, serviceTeam, serviceParticipate, $location, $filter, LxNotificationService) {

	$scope.user=serviceUser.getSession();
	$scope.users=serviceUser.getUsers();
	$scope.password="";
	
	$scope.newTeam = function(Team) {//conseguir id de team
		if ($filter('filter')(serviceTeam.getTeams(), { name: Team.name}).length==0){			
				if (Team.password===$scope.password){
					serviceTeam.newTeam(Team);
					$window.location.href = '#/';
					LxNotificationService.success("You succesfully created "+Team.name+"!");
				}
				else{
					LxNotificationService.success("The password doesn't match!");
				}					
		}
		else{
			LxNotificationService.error("A team with that name already exists!");
		}
	};<commit_msg>Comments removed<commit_after>/*
 * @author <NAME>
 */

kurento_room.controller('newTeamController', function ($scope, $window, serviceUser, serviceTeam, serviceParticipate, $location, $filter, LxNotificationService) {

	$scope.user=serviceUser.getSession();
	$scope.users=serviceUser.getUsers();
	$scope.password="";
	
	$scope.newTeam = function(Team) {
		if ($filter('filter')(serviceTeam.getTeams(), { name: Team.name}).length==0){			
				if (Team.password===$scope.password){
					serviceTeam.newTeam(Team);
					$window.location.href = '#/';
					LxNotificationService.success("You succesfully created "+Team.name+"!");
				}
				else{
					LxNotificationService.success("The password doesn't match!");
				}					
		}
		else{
			LxNotificationService.error("A team with that name already exists!");
		}
	};
{'fraction_non_alphanumeric': 0.16453382084095064, 'fraction_numerical': 0.001218769043266301, 'mean_word_length': 4.604095563139932, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6437939', 'n_tokens_mistral': 595, 'n_tokens_neox': 503, 'n_words': 91}