debug for logged in user
This commit is contained in:
parent
2ac2b09bee
commit
6aa219f265
2 changed files with 4 additions and 2 deletions
2
angular_app/js/app.js
vendored
2
angular_app/js/app.js
vendored
|
@ -43,7 +43,7 @@ eventManApp.run(['$rootScope', '$state', '$stateParams', '$log', 'Info',
|
||||||
Info.get({}, function(data) {
|
Info.get({}, function(data) {
|
||||||
$rootScope.info = data || {};
|
$rootScope.info = data || {};
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
4
angular_app/js/controllers.js
vendored
4
angular_app/js/controllers.js
vendored
|
@ -668,7 +668,8 @@ eventManControllers.controller('LoginCtrl', ['$scope', '$rootScope', '$state', '
|
||||||
}
|
}
|
||||||
User.login(loginData, function(data) {
|
User.login(loginData, function(data) {
|
||||||
if (!data.error) {
|
if (!data.error) {
|
||||||
$rootScope.readInfo(function() {
|
$rootScope.readInfo(function(info) {
|
||||||
|
$log.debug('logged in user: ' + info.user.username);
|
||||||
$rootScope.clearError();
|
$rootScope.clearError();
|
||||||
$state.go('events');
|
$state.go('events');
|
||||||
});
|
});
|
||||||
|
@ -680,6 +681,7 @@ eventManControllers.controller('LoginCtrl', ['$scope', '$rootScope', '$state', '
|
||||||
User.logout({}, function(data) {
|
User.logout({}, function(data) {
|
||||||
if (!data.error) {
|
if (!data.error) {
|
||||||
$rootScope.readInfo(function() {
|
$rootScope.readInfo(function() {
|
||||||
|
$log.debug('logged out user');
|
||||||
$state.go('events');
|
$state.go('events');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue