mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[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();
|
const user = await this.userService.currentUser();
|
||||||
if (user && user?.id) {
|
if (user && user?.id) {
|
||||||
await this.userProfile.fetchUserProfile();
|
await Promise.all([
|
||||||
await this.userSettings.fetchCurrentUserSettings();
|
this.userProfile.fetchUserProfile(),
|
||||||
await this.store.workspaceRoot.fetchWorkspaces();
|
this.userSettings.fetchCurrentUserSettings(),
|
||||||
|
this.store.workspaceRoot.fetchWorkspaces(),
|
||||||
|
]);
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.data = user;
|
this.data = user;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -104,6 +104,7 @@ export class ProfileStore implements IUserProfileStore {
|
|||||||
message: "Failed to fetch user profile",
|
message: "Failed to fetch user profile",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ export class UserSettingsStore implements IUserSettingsStore {
|
|||||||
message: "Failed to fetch user settings",
|
message: "Failed to fetch user settings",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user