mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-13 00:26:55 -05:00
Check for success instead of not failure for redirect
This commit is contained in:
parent
d3de95c5dc
commit
0625e63595
@ -15,7 +15,7 @@ angular.module('AuthSvc', []).service('AuthService', ['$http', '$window', functi
|
||||
},
|
||||
data: user
|
||||
}).then(function(res) {
|
||||
if (res.status !== 401)
|
||||
if (res.status === 200)
|
||||
$window.location.href = '/home';
|
||||
})
|
||||
};
|
||||
@ -43,8 +43,8 @@ angular.module('AuthSvc', []).service('AuthService', ['$http', '$window', functi
|
||||
},
|
||||
data: user
|
||||
}).then(function(res) {
|
||||
if (res.status === 401) return false;
|
||||
$window.location.href = '/home';
|
||||
if (res.status === 200)
|
||||
$window.location.href = '/home';
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user