Fixed double slashes in Stripe webhook URL

- `getSiteUrl` already returns a trailing slash so we shouldn't add
  another one in the path
This commit is contained in:
Daniel Lockyer 2022-12-07 10:18:21 +07:00
parent de97d90cf9
commit 570b697b4a
No known key found for this signature in database

View File

@ -9,7 +9,7 @@ const {startGhost} = require('../../utils/e2e-framework');
const {stopGhost} = require('../../utils/e2e-utils'); const {stopGhost} = require('../../utils/e2e-utils');
const startWebhookServer = () => { const startWebhookServer = () => {
const command = `stripe listen --forward-to ${config.getSiteUrl()}/members/webhooks/stripe/ ${process.env.CI ? `--api-key ${process.env.STRIPE_SECRET_KEY}` : ''}`.trim(); const command = `stripe listen --forward-to ${config.getSiteUrl()}members/webhooks/stripe/ ${process.env.CI ? `--api-key ${process.env.STRIPE_SECRET_KEY}` : ''}`.trim();
spawn(command.split(' ')[0], command.split(' ').slice(1)); spawn(command.split(' ')[0], command.split(' ').slice(1));
}; };