0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Removed old members site endpoint usage

refs https://github.com/TryGhost/Team/issues/1599
This commit is contained in:
Rishabh 2022-05-12 20:46:52 +05:30
parent 8bee963e53
commit 5eb1131816

View file

@ -439,10 +439,10 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
};
api.init = async () => {
let [{site}, member] = await Promise.all([
api.site.read(),
let [member] = await Promise.all([
api.member.sessionData()
]);
let site = {};
let newsletters = [];
let tiers = [];
let settings = {};
@ -456,13 +456,13 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
site = {
...settings,
newsletters,
products: tiers
tiers
};
site = transformApiSiteData({site});
} catch (e) {
// Ignore
}
return {site, member, newsletters, tiers};
site = transformApiSiteData({site});
return {site, member};
};
return api;