add basic test, disable etag on post routes as well, paypal ipn: prevent set headers after response error

This commit is contained in:
Matteo Pagliazzi
2020-04-17 14:50:09 +02:00
parent f757e645b7
commit 24e1bfdfba
4 changed files with 38 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
/* eslint-disable camelcase */
import paypalPayments from '../../../libs/payments/paypal';
import logger from '../../../libs/logger';
import shared from '../../../../common';
import {
authWithSession,
@@ -171,7 +172,9 @@ api.ipn = {
async handler (req, res) {
res.sendStatus(200);
await paypalPayments.ipn(req.body);
paypalPayments
.ipn(req.body)
.catch(err => logger.error(err));
},
};