0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Updated site and member data to load in parallel

This reverts commit 841793e4d3.
This commit is contained in:
Rishabh 2021-05-24 19:21:48 +05:30
parent 674f6f8e1e
commit 08d740133f

View file

@ -244,8 +244,10 @@ function setupGhostApi({siteUrl = window.location.origin}) {
};
api.init = async () => {
const {site} = await api.site.read();
const member = await api.member.sessionData();
const [{site}, member] = await Promise.all([
api.site.read(),
api.member.sessionData()
]);
return {site, member};
};