mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Removed body-parser from router middleware
no-issue Validating stripe webhooks requires the body as a buffer, so we can no longer parse json body by default
This commit is contained in:
parent
82346ef67b
commit
f7b61e901d
@ -83,9 +83,8 @@ module.exports = function MembersApi({
|
||||
}
|
||||
|
||||
const apiInstance = new Router();
|
||||
apiInstance.use(body.json());
|
||||
|
||||
apiInstance.post('/send-magic-link', async function (req, res) {
|
||||
apiInstance.post('/send-magic-link', body.json(), async function (req, res) {
|
||||
const email = req.body.email;
|
||||
if (!email) {
|
||||
res.writeHead(400);
|
||||
@ -102,7 +101,7 @@ module.exports = function MembersApi({
|
||||
}
|
||||
});
|
||||
|
||||
apiInstance.post('/create-stripe-checkout-session', ensureStripe, async function (req, res) {
|
||||
apiInstance.post('/create-stripe-checkout-session', ensureStripe, body.json(), async function (req, res) {
|
||||
const plan = req.body.plan;
|
||||
const identity = req.body.identity;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user