TASK22109: email mini-slice tidy and notify negative-path tests
This commit is contained in:
@@ -393,15 +393,9 @@ export default async function CombinedApiProxy(req, res) {
|
||||
};
|
||||
})
|
||||
);
|
||||
// res.status(200).json(results);
|
||||
// Step 3: Group results by contact_email
|
||||
const groupedByEmail = _.groupBy(results, "contact_email");
|
||||
|
||||
//Convert to array format
|
||||
// const groupedArray = Object.entries(groupedByEmail).map(([email, entries]) => ({ contact_email: email, entries }));
|
||||
|
||||
//console.log(buildNotifyPayloads(groupedByEmail));
|
||||
|
||||
const payloads = buildNotifyPayloads(groupedByEmail); // watchlistByEmail should be defined
|
||||
|
||||
// Iterate and send
|
||||
@@ -410,7 +404,6 @@ export default async function CombinedApiProxy(req, res) {
|
||||
for (const payload of payloads) {
|
||||
if (!payload) continue; // skip null entries
|
||||
|
||||
//console.log(payload);
|
||||
const result = {
|
||||
email: payload.email_address,
|
||||
reference: payload.reference,
|
||||
|
||||
Reference in New Issue
Block a user