adding a DELETE to /authtoken when user logs out

This commit is contained in:
jaredevantabor
2017-02-02 16:58:32 -08:00
parent 02c7f87185
commit 53208c22ec
3 changed files with 67 additions and 51 deletions

View File

@@ -142,9 +142,10 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope',
});
})
.error(function (data, status) {
Authorization.logout();
Wait('stop');
Alert('Error', 'Failed to access user information. GET returned status: ' + status, 'alert-danger', loginAgain);
Authorization.logout().then( () => {
Wait('stop');
Alert('Error', 'Failed to access user information. GET returned status: ' + status, 'alert-danger', loginAgain);
});
});
});