fix(security): harden Contact Us PET notifications
This commit is contained in:
+5
-12
@@ -17,8 +17,10 @@ import {
|
||||
} from "redux-form";
|
||||
import { connect } from "react-redux";
|
||||
import { createCRMTask } from "../actions/services/integrationService";
|
||||
import { sendEmail } from "../actions/services/notifyService";
|
||||
import { sendContactUsConfirmation } from "../actions/services/notifyDirectService";
|
||||
import {
|
||||
sendContactUsConfirmation,
|
||||
sendContactUsPETNotification
|
||||
} from "../actions/services/notifyDirectService";
|
||||
import { wrapper } from "../store/store";
|
||||
|
||||
import { useState } from "react";
|
||||
@@ -349,19 +351,10 @@ let ContactUs = (props) => {
|
||||
};
|
||||
|
||||
const sendPETEmail = async (formValues, petEmail) => {
|
||||
const reference = "PEDW-CONTACT-US-PET";
|
||||
const templateId = "56bbdcf9-d63d-48e9-a794-3e253dd7498b";
|
||||
const templateIdCY = "00b794d3-29aa-434d-b696-0ef0b0337d79";
|
||||
|
||||
console.log(petEmail);
|
||||
|
||||
try {
|
||||
const res = await sendEmail(
|
||||
templateId,
|
||||
petEmail,
|
||||
formValues,
|
||||
reference
|
||||
);
|
||||
const res = await sendContactUsPETNotification(formValues, petEmail);
|
||||
|
||||
console.log("Email sent successfully.");
|
||||
setFormSubmitted(true);
|
||||
|
||||
Reference in New Issue
Block a user