Renamed getRequirePaymentSetting

no-issue

The negation before this function call was a little easy to miss for me
This commit is contained in:
Fabien O'Carroll 2019-10-11 12:16:57 +07:00
parent 0c602976c0
commit 1500881923

View File

@ -171,9 +171,9 @@ function getAuthSecret() {
return secret;
}
function getRequirePaymentSetting() {
function getAllowSelfSignup() {
const subscriptionSettings = settingsCache.get('members_subscription_settings');
return !!subscriptionSettings.requirePaymentForSignup;
return !subscriptionSettings.requirePaymentForSignup;
}
// NOTE: the function is an exact duplicate of one in GhostMailer should be extracted
@ -199,7 +199,7 @@ function createApiInstance() {
signinURL.searchParams.set('action', type);
return signinURL.href;
},
allowSelfSignup: !getRequirePaymentSetting(),
allowSelfSignup: getAllowSelfSignup(),
secret: getAuthSecret()
},
mail: {