mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-15 04:25:41 +00:00
Fixed api URL
This commit is contained in:
@@ -1,2 +1 @@
|
||||
FROM digitallyseamless/nodejs-bower-grunt-runtime
|
||||
|
||||
|
||||
@@ -104,35 +104,4 @@ angular.module('dssWebApp', [
|
||||
});
|
||||
};
|
||||
|
||||
//ensure login before state change
|
||||
$rootScope.$on('$stateChangeStart', function (event, toState, toParams) {
|
||||
|
||||
/*
|
||||
if (!$rootScope.currentUser && Session.getLocalToken() != null && Session.getBackend()) {
|
||||
LoginService.loginUser().then(function (user) {
|
||||
LoginService.getUserProfile()
|
||||
.then(function (user) {
|
||||
$rootScope.setCurrentUser(user);
|
||||
$rootScope.connectSockets();
|
||||
return $state.go(toState.name, toParams);
|
||||
});
|
||||
}, function (result) {
|
||||
console.log('Unable to login', result);
|
||||
if (result.code === 403 || result.code === 400 || result.code === 401 || result.code === 500) {
|
||||
LoginService.logoutUser()
|
||||
.then(function () {
|
||||
return $state.go(toState.name, toParams);
|
||||
});
|
||||
} else {
|
||||
debugger;
|
||||
console.error('Ooops');
|
||||
LoginService.logoutUser()
|
||||
.then(function () {
|
||||
return $state.go(toState.name, toParams);
|
||||
});
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
}*/
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user