Commit a6dc0129 authored by Evren Kutar's avatar Evren Kutar

login screen fix for showing dashboard view if not login

parent 2440378e
......@@ -57,7 +57,9 @@ angular.module('ulakbus')
.otherwise({redirectTo: '/dashboard'});
}])
.run(function ($rootScope) {
.run(function ($rootScope, AuthService) {
AuthService.check_auth();
$rootScope.loggedInUser = false;
$rootScope.loginAttempt = 0;
......
......@@ -22,6 +22,7 @@ angular.module('ulakbus.auth')
return $http
.post(Generator.makeUrl(scope), scope.form_params)
.success(function (data, status, headers, config) {
// if response data.cmd is 'upgrade'
if (data.cmd === 'upgrade') {
$rootScope.loggedInUser = true;
$rootScope.$broadcast("user_ready");
......
......@@ -318,7 +318,7 @@ angular.module('ulakbus')
};
// check login status
AuthService.check_auth();
// AuthService.check_auth();
var generate_dashboard = function () {
if ($rootScope.current_user !== true){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment