asadf
This commit is contained in:
parent
45aa59706c
commit
9d379c759c
11
js/app.js
11
js/app.js
|
@ -126,11 +126,14 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
|
||||||
|
|
||||||
if (requiresLogin && !Auth.isLoggedIn()) {
|
if (requiresLogin && !Auth.isLoggedIn()) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
console.log('asdfasdfasdfasdfasdfasdfasdfasdf', toState);
|
console.log('stuff here ->', toState);
|
||||||
|
if (!angular.equals(toState.data.session, {})) {
|
||||||
|
var sess = toState.data.session.access_token;
|
||||||
|
console.log('WHERE', $rootScope.redirectedURL );
|
||||||
|
Auth.add(sess)
|
||||||
|
$state.go("app." + $rootScope.redirectedURL);
|
||||||
|
}
|
||||||
$state.go('splash-page', { 'toState': toState.name });
|
$state.go('splash-page', { 'toState': toState.name });
|
||||||
} else {
|
|
||||||
// Auth.get(Auth.session);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
||||||
|
|
Loading…
Reference in New Issue