forked from youknowriad/authenticate.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Like this:
app.factory('redirectInterceptor', ['$q', '$rootScope', function($q, $rootScope) {
return function(promise) {
promise.then(
function(response) {
return response;
},
function(response) {
switch(response.status){
case 401:
$rootScope.logout();
break;
case 403:
$rootScope.logout();
break;
default:
var x;
}
return $q.reject(response);
}
);
return promise;
};
}]);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels