<commit_before>import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';

export default Ember.Route.extend(ApplicationRouteMixin, {

	init: function(){
		// this.get('session').restore();
	},

	actions: {
		transitionToProjectList: function(){
			this.transitionTo('project.list');
		},

		sessionAuthenticationSucceeded: function(){
			this.transitionTo('project.list');
		},

		sessionAuthenticationFailed: function(error){
			var alert = {};
			alert.type = 'danger';
			switch (error.code) {
		      case 'INVALID_EMAIL':
		        alert.message = 'The specified user account email is invalid.';
		        break;
		      case 'INVALID_PASSWORD':
		        alert.message = 'The specified user account password is incorrect.';
		        break;
		      case 'INVALID_USER':
		        alert.message = 'The specified user account does not exist.';
		        break;
		      default:
		        alert.message = 'Error logging user in: ' + error;
		    }
			this.controllerFor('user.login').set('alert', alert);
			this.controllerFor('user.login').set('isLoading', false);
		}
	}
});<commit_msg>Login redirection route update<commit_after>import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';

export default Ember.Route.extend(ApplicationRouteMixin, {

	init: function(){
		// this.get('session').restore();
	},

	actions: {
		transitionToProjectList: function(){
			this.transitionTo('project.contribute');
		},

		sessionAuthenticationSucceeded: function(){
			this.transitionTo('project.contribute');
		},

		sessionAuthenticationFailed: function(error){
			var alert = {};
			alert.type = 'danger';
			switch (error.code) {
		      case 'INVALID_EMAIL':
		        alert.message = 'The specified user account email is invalid.';
		        break;
		      case 'INVALID_PASSWORD':
		        alert.message = 'The specified user account password is incorrect.';
		        break;
		      case 'INVALID_USER':
		        alert.message = 'The specified user account does not exist.';
		        break;
		      default:
		        alert.message = 'Error logging user in: ' + error;
		    }
			this.controllerFor('user.login').set('alert', alert);
			this.controllerFor('user.login').set('isLoading', false);
		}
	}
});
{'fraction_non_alphanumeric': 0.13079255088783023, 'fraction_numerical': 0.0, 'mean_word_length': 3.1847826086956523, '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': '2634789', 'n_tokens_mistral': 733, 'n_tokens_neox': 630, 'n_words': 149}