This commit is contained in:
saeid
2019-05-10 19:27:01 +04:30
parent aa61c9e54f
commit ead396a3e5
51 changed files with 66077 additions and 16201 deletions
+3 -6
View File
@@ -95,7 +95,7 @@ const UserService = {
**/
logout: async function() {
try {
const response = await ApiService.post(urls.logout);
await ApiService.post(urls.logout);
// Remove the token and remove Authorization header from Api Service as well
TokenService.removeToken();
TokenService.removeRefreshToken();
@@ -105,12 +105,9 @@ const UserService = {
// NOTE: Again, we'll cover the 401 Interceptor a bit later.
ApiService.unmount401Interceptor();
return response.data;
return true;
} catch (error) {
throw new AuthenticationError(
error.response.status,
error.response.data.detail
);
return true
}
},
/**