Merged PR 1648: 16578 link url updated

16578 link url updated

Related work items: #16578
This commit is contained in:
Robert Bond
2025-05-30 13:23:49 +00:00
+5 -4
View File
@@ -62,7 +62,8 @@ const buildNotifyPayloads = (watchlistByEmail) => {
doc.pinswg_documentpublisheddate?.split("T")[0]
) || "No Date";
const link =
process.env.API_ROOT + doc.pinswg_hashlink || "[No Link]";
process.env.NEXTAUTH_URL + doc.pinswg_hashlink ||
"[No Link]";
return ` - ${ref}: ${name} (${date})\n Link: ${link}`;
})
.join("\n");
@@ -139,7 +140,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
)}\n`
: "";
const caseUnsubscribelink = `Unsubscribe to updates on this case https://${process.env.API_ROOT}/unsubscribe/${entry.pinswg_watchlistid}`;
const caseUnsubscribelink = `Unsubscribe to updates on this case https://${process.env.NEXTAUTH_URL}/unsubscribe/${entry.pinswg_watchlistid}`;
return `Case: ${caseRef}\n${[
docSection,
@@ -152,7 +153,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
})
.join("\n\n"),
unsubscribeLink: `Unsubscribe by selecting this link if you no longer want to receive any updates ${
process.env.API_ROOT + "unsubscribeall/" + "contactId"
process.env.NEXTAUTH_URL + "unsubscribeall/" + "contactId"
}`,
};
@@ -162,7 +163,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
personalisation,
reference,
oneClickUnsubscribeURL:
process.env.API_ROOT + "unsubscribe/" + "eee",
process.env.NEXTAUTH_URL + "unsubscribe/" + "eee",
};
})
.filter(Boolean); // Remove any nulls from filtered-out users