mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-30 22:41:47 -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
|
data: user
|
||||||
}).then(function(res) {
|
}).then(function(res) {
|
||||||
if (res.status !== 401)
|
if (res.status === 200)
|
||||||
$window.location.href = '/home';
|
$window.location.href = '/home';
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
@ -43,8 +43,8 @@ angular.module('AuthSvc', []).service('AuthService', ['$http', '$window', functi
|
|||||||
},
|
},
|
||||||
data: user
|
data: user
|
||||||
}).then(function(res) {
|
}).then(function(res) {
|
||||||
if (res.status === 401) return false;
|
if (res.status === 200)
|
||||||
$window.location.href = '/home';
|
$window.location.href = '/home';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user