fix(security): harden Contact Us sender confirmations
This commit is contained in:
+3
-8
@@ -18,6 +18,7 @@ import {
|
||||
import { connect } from "react-redux";
|
||||
import { createCRMTask } from "../actions/services/integrationService";
|
||||
import { sendEmail } from "../actions/services/notifyService";
|
||||
import { sendContactUsConfirmation } from "../actions/services/notifyDirectService";
|
||||
import { wrapper } from "../store/store";
|
||||
|
||||
import { useState } from "react";
|
||||
@@ -329,16 +330,10 @@ let ContactUs = (props) => {
|
||||
.children
|
||||
});
|
||||
|
||||
const reference = "PEDW-CONTACT-US";
|
||||
const templateId = "69228c5f-8500-40ff-a6c5-95a9434c3ec8";
|
||||
const templateIdCY = "b8f1f76d-4ab9-4a2f-b294-e3623c6095a3";
|
||||
|
||||
try {
|
||||
const res = await sendEmail(
|
||||
router.locale !== "en" ? templateIdCY : templateId,
|
||||
formValues.contactEmail,
|
||||
const res = await sendContactUsConfirmation(
|
||||
formValues,
|
||||
reference
|
||||
router.locale !== "en" ? "cy" : "en"
|
||||
);
|
||||
|
||||
console.log("Email sent successfully.");
|
||||
|
||||
Reference in New Issue
Block a user