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) { exports.emailBounce = async function (req, res, next) {
try { try {
const body = JSON.parse(req.body); const body = JSON.parse(req.body);
if (body.type === "SubscriptionConfirmation") { if (body.type !== "Notification") {
logger.log("SNS-confirmation", "DEBUG", "api", null, { logger.log("SNS-message", "DEBUG", "api", null, {
message: body.message, body: req.body,
url: body.SubscribeUrl,
body: body,
}); });
} }
if (body.Type === "Notification") { if (body.Type === "Notification") {