mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated members site data to include new portal settings
no issue - Adds new portal button settings to members site data for portal script - Updates settings input/output serializers to handle portal icon image url
This commit is contained in:
parent
c0e3c8bcfe
commit
8d989bd3c3
3 changed files with 6 additions and 3 deletions
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
setting.key = 'lang';
|
||||
}
|
||||
|
||||
if (['cover_image', 'icon', 'logo'].includes(setting.key)) {
|
||||
if (['cover_image', 'icon', 'logo', 'portal_button_icon'].includes(setting.key)) {
|
||||
setting = url.forSetting(setting);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -93,7 +93,7 @@ const forSettings = (attrs) => {
|
|||
// @NOTE: Admin & Content API return a different format, need to mappers
|
||||
if (_.isArray(attrs)) {
|
||||
attrs.forEach((obj) => {
|
||||
if (['cover_image', 'logo', 'icon'].includes(obj.key) && obj.value) {
|
||||
if (['cover_image', 'logo', 'icon', 'portal_button_icon'].includes(obj.key) && obj.value) {
|
||||
obj.value = urlUtils.urlFor('image', {image: obj.value}, true);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -98,7 +98,10 @@ const getMemberSiteData = async function (req, res) {
|
|||
is_stripe_configured: isStripeConfigured,
|
||||
portal_button: settingsCache.get('portal_button'),
|
||||
portal_name: settingsCache.get('portal_name'),
|
||||
portal_plans: settingsCache.get('portal_plans')
|
||||
portal_plans: settingsCache.get('portal_plans'),
|
||||
portal_button_icon: settingsCache.get('portal_button_icon'),
|
||||
portal_button_signup_text: settingsCache.get('portal_button_signup_text'),
|
||||
portal_button_style: settingsCache.get('portal_button_style')
|
||||
};
|
||||
|
||||
// accent_color is currently an experimental feature
|
||||
|
|
Loading…
Add table
Reference in a new issue