forked from github/plane
[WEB-1467] chore: run the API's required to bootstrap the application in parallel. (#4642)
This commit is contained in:
parent
67bd14ceb5
commit
b016e1d1b5
@ -97,9 +97,11 @@ export class UserStore implements IUserStore {
|
||||
});
|
||||
const user = await this.userService.currentUser();
|
||||
if (user && user?.id) {
|
||||
await this.userProfile.fetchUserProfile();
|
||||
await this.userSettings.fetchCurrentUserSettings();
|
||||
await this.store.workspaceRoot.fetchWorkspaces();
|
||||
await Promise.all([
|
||||
this.userProfile.fetchUserProfile(),
|
||||
this.userSettings.fetchCurrentUserSettings(),
|
||||
this.store.workspaceRoot.fetchWorkspaces(),
|
||||
]);
|
||||
runInAction(() => {
|
||||
this.data = user;
|
||||
this.isLoading = false;
|
||||
|
@ -104,6 +104,7 @@ export class ProfileStore implements IUserProfileStore {
|
||||
message: "Failed to fetch user profile",
|
||||
};
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -73,6 +73,7 @@ export class UserSettingsStore implements IUserSettingsStore {
|
||||
message: "Failed to fetch user settings",
|
||||
};
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user