sns missing early return for click evenType

This commit is contained in:
sjdonado
2025-09-05 07:47:07 +02:00
parent 4508a3ec32
commit bb77785a4c
@@ -44,9 +44,12 @@ export class SNSWebhook {
if (email.projectId) { if (email.projectId) {
if (body.eventType === "Click") { if (body.eventType === "Click") {
signale.success(`Click received for ${email.contact.email} from ${project.name}`); signale.success(`Click received for ${email.contact.email} from ${project.name}`);
await prisma.click.create({ await prisma.click.create({
data: { emailId: email.id, link: body.click.link }, data: { emailId: email.id, link: body.click.link },
}); });
return res.status(200).json({ success: true });
} }
if (body.eventType === "Complaint") { if (body.eventType === "Complaint") {