<commit_before>var app = angular.module('bizGramApp', [
	'authFactory',
	'dmFactory',
	'roomFactory',
	'userFactory',
	'replyFactory',
	'uploadFactory',
	'visualFactory',
	'ui.router', 
	'mainCtrl',
	'visualCtrl',
	'authCtrl', 
	'directMessageCtrl',
	'roomCtrl', 
	'replyCtrl', 
	'profileCtrl', 
	'uploadCtrl']);

app.config(function ($stateProvider, $urlRouterProvider) {

	// need to dynamically create routes based on the rooms available

	$urlRouterProvider.otherwise('/signin');

	$stateProvider

	.state('main', {
		url: '/',
		templateUrl: 'app/templates/main.html',
		data: {
			requireLogin: true // applies to all children.
		}
	})
	.state('main.room', {
		url: 'room/:roomName',
		parent: 'main',
		templateUrl: 'app/templates/room.html'
	})
	.state('oAuth', {
		url: '/oAuth',
		templateUrl: 'app/templates/oAuth.html'
	})
	.state('main.direct', {
		url: 'dm/:user',
		parent: 'main',
		templateUrl: 'app/templates/directmessage.html'
	})
	.state('visual', {
		url:'/visual/:visualId',
		templateUrl: 'app/templates/visualization.html',
		data: {
			requireLogin: true
		}
	})
	.state('signin',{
		url: '/signin',
		templateUrl: 'app/templates/signin.html',
		controller:'SigninController'
	})
	.state('signup',{
		url: '/signup',
		templateUrl:'app/templates/signup.html',
		controller:'SignupController'
	})
	.state('logout',{
		url: '/logout',
		controller: function(Auth, $location, $rootScope){
			Auth.signout();
			delete $rootScope.logInfo;
			$location.path('/signin');
		},
		data: {
			requireLogin: true
		}
	})
	.state('profile',{
		url: '/profile',
		templateUrl: 'app/templates/profile.html',
		controller: 'ProfileController',
		data: {
			requireLogin: true
		}
	})
	.state('upload',{
		url: '/upload',
		templateUrl: 'app/templates/upload.html',
		data: {
			requireLogin: true
		}
	});
});

app.run(function ($rootScope, $window, $location, $state){

	$rootScope.shouldShow = true;
	$rootScope.$on('$stateChangeStart', function (event, toState){
		var requireLogin = toState.data.requireLogin;
		if(requireLogin && !$rootScope.logInfo){
			event.preventDefault();
			console.log('User must be logged in to access page');
			$state.go('signin');
		}
	});

});
<commit_msg>(feat) routing for org signup<commit_after>var app = angular.module('bizGramApp', [
	'authFactory',
	'dmFactory',
	'roomFactory',
	'userFactory',
	'replyFactory',
	'uploadFactory',
	'visualFactory',
	'ui.router',
	'mainCtrl',
	'visualCtrl',
	'authCtrl',
	'directMessageCtrl',
	'roomCtrl',
	'replyCtrl',
	'profileCtrl',
	'uploadCtrl']);

app.config(function ($stateProvider, $urlRouterProvider) {

	// need to dynamically create routes based on the rooms available

	$urlRouterProvider.otherwise('/signin');

	$stateProvider

	.state('orgsignup', {
		url: '/orgsignup',
		templateUrl: 'app/templates/orgsignup.html'
	})
	.state('main', {
		url: '/',
		templateUrl: 'app/templates/main.html',
		data: {
			requireLogin: true // applies to all children.
		}
	})
	.state('main.room', {
		url: 'room/:roomName',
		parent: 'main',
		templateUrl: 'app/templates/room.html'
	})
	.state('oAuth', {
		url: '/oAuth',
		templateUrl: 'app/templates/oAuth.html'
	})
	.state('main.direct', {
		url: 'dm/:user',
		parent: 'main',
		templateUrl: 'app/templates/directmessage.html'
	})
	.state('visual', {
		url:'/visual/:visualId',
		templateUrl: 'app/templates/visualization.html',
		data: {
			requireLogin: true
		}
	})
	.state('signin',{
		url: '/signin',
		templateUrl: 'app/templates/signin.html',
		controller:'SigninController'
	})
	.state('signup',{
		url: '/signup',
		templateUrl:'app/templates/signup.html',
		controller:'SignupController'
	})
	.state('logout',{
		url: '/logout',
		controller: function(Auth, $location, $rootScope){
			Auth.signout();
			delete $rootScope.logInfo;
			$location.path('/signin');
		},
		data: {
			requireLogin: true
		}
	})
	.state('profile',{
		url: '/profile',
		templateUrl: 'app/templates/profile.html',
		controller: 'ProfileController',
		data: {
			requireLogin: true
		}
	})
	.state('upload',{
		url: '/upload',
		templateUrl: 'app/templates/upload.html',
		data: {
			requireLogin: true
		}
	});
});

app.run(function ($rootScope, $window, $location, $state){

	$rootScope.shouldShow = true;
	$rootScope.$on('$stateChangeStart', function (event, toState){
		var requireLogin = toState.data.requireLogin;
		if(requireLogin && !$rootScope.logInfo){
			event.preventDefault();
			console.log('User must be logged in to access page');
			$state.go('signin');
		}
	});
	$rootScope.logout = function(){
		Auth.signout();
		$rootScope.shouldShow = true;
	};

});

{'fraction_non_alphanumeric': 0.18646649260226283, 'fraction_numerical': 0.0, 'mean_word_length': 4.277841561423651, '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': '3662015', 'n_tokens_mistral': 1791, 'n_tokens_neox': 1638, 'n_words': 294}