mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
Added new settings for members signup redirects (#12370)
refs #12366 Adds two new settings for redirecting members after signup, based on if they're paid or free, defaulting to the current redirect of "/"
This commit is contained in:
parent
001cf6bb29
commit
2600a20f54
@ -0,0 +1,16 @@
|
||||
const logging = require('../../../../../shared/logging');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
module.exports = createTransactionalMigration(
|
||||
|
||||
async function up(connection) {
|
||||
logging.info('Adding members_{paid,free}_signup_redirect settings to the members group');
|
||||
await connection('settings')
|
||||
.whereIn('key', ['members_paid_signup_redirect', 'members_free_signup_redirect'])
|
||||
.update({
|
||||
group: 'members'
|
||||
});
|
||||
},
|
||||
|
||||
async function down() {}
|
||||
);
|
@ -258,6 +258,14 @@
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
"members_free_signup_redirect": {
|
||||
"defaultValue": "/",
|
||||
"type": "string"
|
||||
},
|
||||
"members_paid_signup_redirect": {
|
||||
"defaultValue": "/",
|
||||
"type": "string"
|
||||
},
|
||||
"stripe_product_name": {
|
||||
"defaultValue": "Ghost Subscription",
|
||||
"type": "string"
|
||||
|
@ -39,6 +39,8 @@ const defaultSettingsKeyTypes = [
|
||||
{key: 'members_from_address', type: 'members'},
|
||||
{key: 'members_support_address', type: 'members'},
|
||||
{key: 'members_reply_address', type: 'members'},
|
||||
{key: 'members_paid_signup_redirect', type: 'members'},
|
||||
{key: 'members_free_signup_redirect', type: 'members'},
|
||||
{key: 'stripe_product_name', type: 'members'},
|
||||
{key: 'stripe_plans', type: 'members'},
|
||||
{key: 'stripe_secret_key', type: 'members'},
|
||||
|
@ -36,6 +36,8 @@ const defaultSettingsKeyTypes = [
|
||||
{key: 'members_from_address', type: 'members'},
|
||||
{key: 'members_support_address', type: 'members'},
|
||||
{key: 'members_reply_address', type: 'members'},
|
||||
{key: 'members_paid_signup_redirect', type: 'members'},
|
||||
{key: 'members_free_signup_redirect', type: 'members'},
|
||||
{key: 'stripe_product_name', type: 'members'},
|
||||
{key: 'stripe_plans', type: 'members'},
|
||||
{key: 'stripe_secret_key', type: 'members'},
|
||||
|
@ -39,6 +39,8 @@ const defaultSettingsKeys = [
|
||||
'members_from_address',
|
||||
'members_support_address',
|
||||
'members_reply_address',
|
||||
'members_free_signup_redirect',
|
||||
'members_paid_signup_redirect',
|
||||
'stripe_product_name',
|
||||
'stripe_plans',
|
||||
'stripe_secret_key',
|
||||
|
@ -34,7 +34,7 @@ describe('DB version integrity', function () {
|
||||
// Only these variables should need updating
|
||||
const currentSchemaHash = '102b04bbd38cd2451fbf0957ffc35b30';
|
||||
const currentFixturesHash = 'd46d696c94d03e41a5903500547fea77';
|
||||
const currentSettingsHash = '984cddcac211510b71e049860b298ebc';
|
||||
const currentSettingsHash = 'b7c0c2c6a4c61561dfefe642470d30f8';
|
||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||
|
||||
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
||||
|
Loading…
Reference in New Issue
Block a user