Update SNS handling

This commit is contained in:
Patrick Fic
2022-09-23 13:48:45 -07:00
parent 7aeac03b2c
commit 39efb52497

View File

@@ -209,11 +209,9 @@ async function logEmail(req, email) {
exports.emailBounce = async function (req, res, next) {
try {
const body = JSON.parse(req.body);
if (body.type === "SubscriptionConfirmation") {
logger.log("SNS-confirmation", "DEBUG", "api", null, {
message: body.message,
url: body.SubscribeUrl,
body: body,
if (body.type !== "Notification") {
logger.log("SNS-message", "DEBUG", "api", null, {
body: req.body,
});
}
if (body.Type === "Notification") {