|
|
@@ -10,16 +10,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
}]);
|
|
|
app.factory('httpInterceptor', ['$window', '$q', function ($window, $q) {
|
|
|
- var session = $window.sessionStorage;
|
|
|
var httpInterceptor = {
|
|
|
'responseError': function (response) {
|
|
|
- if (!session.authenticated) {
|
|
|
- if (response.status == 401) {// UNAUTHORIZED
|
|
|
- // window.location.href = response.data.loginUrl || 'index';
|
|
|
- // window.location.href = window.location.origin + window.location.pathname + '/login';
|
|
|
- window.location.reload();
|
|
|
- return $q.reject(response);
|
|
|
- }
|
|
|
+ if (response.status == 401) {// UNAUTHORIZED
|
|
|
+ // window.location.href = response.data.loginUrl || 'index';
|
|
|
+ // window.location.href = window.location.origin + window.location.pathname + '/login';
|
|
|
+ window.location.reload();
|
|
|
+ return $q.reject(response);
|
|
|
}
|
|
|
return $q.reject(response);
|
|
|
}
|