sns missing early return for click evenType
This commit is contained in:
@@ -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") {
|
||||||
|
|||||||
Reference in New Issue
Block a user