mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
Fixed members settings cleanup for mailgun config
This commit is contained in:
parent
b3aba084ee
commit
45cd39c386
@ -142,12 +142,12 @@ const action = (attrs) => {
|
||||
const settings = (attrs) => {
|
||||
// @NOTE: Admin & Content API return a different format, need to mappers
|
||||
// We don't send mail provider API key in settings API if set in config
|
||||
let membersSubscriptionSettings = {};
|
||||
if (_.isArray(attrs)) {
|
||||
membersSubscriptionSettings = attrs.find(({key}) => {
|
||||
const membersSubscriptionSettingsObj = attrs.find(({key}) => {
|
||||
return key === 'members_subscription_settings';
|
||||
}).value;
|
||||
if (config.get('mailgunApiKey')) {
|
||||
}) || {};
|
||||
const membersSubscriptionSettings = membersSubscriptionSettingsObj.value;
|
||||
if (membersSubscriptionSettings && config.get('mailgunApiKey')) {
|
||||
let membersSubscriptionSettingsJson = JSON.parse(membersSubscriptionSettings);
|
||||
delete membersSubscriptionSettingsJson.mailgunApiKey;
|
||||
attrs.forEach((attr) => {
|
||||
|
Loading…
Reference in New Issue
Block a user