This commit is contained in:
saeid
2019-04-16 18:33:29 +04:30
parent 655d6bf800
commit ee6c36ade3
9 changed files with 65 additions and 75 deletions
+2 -3
View File
@@ -42,8 +42,7 @@ const UserService = {
// NOTE: We haven't covered this yet in our ApiService
// but don't worry about this just yet - I'll come back to it later
ApiService.mount401Interceptor();
return response.data.access_token;
return response.data.token;
} catch (error) {
throw new AuthenticationError(error.response.status, error.response.data.detail);
}
@@ -132,7 +131,7 @@ const UserService = {
// Update the header in ApiService
ApiService.setHeader()
return response.data.access_token
return response.data.token
} catch (error) {
throw new AuthenticationError(error.response.status, error.response.data.detail)
}