feat: edit state, help button, loader while login in
This commit is contained in:
parent
97544c1760
commit
b28dbaea30
8 changed files with 83 additions and 57 deletions
|
|
@ -27,11 +27,13 @@ class UserService extends APIService {
|
|||
}
|
||||
|
||||
async currentUser(): Promise<any> {
|
||||
if (!this.getAccessToken()) return null;
|
||||
return this.get(USER_ENDPOINT)
|
||||
.then((response) => {
|
||||
return response?.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.purgeAccessToken();
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue