Website: Update generated campaign names in receive-from-zapier webhook (#26678)

Closes: #26637

Changes:
- Updated timestamps in names of generated campaign names.
This commit is contained in:
Eric 2025-02-27 17:17:42 -06:00 committed by GitHub
parent fc1c901238
commit 40aeaf7c76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -143,7 +143,7 @@ module.exports = {
// When the campaign actually exists in LinkedIn, Zapier will send another event to update the campaign urn in the website's database.
let placeholderUrn = 'PLACEHOLDER-'+sails.helpers.strings.random();
let nowAt = new Date();
let newCampaignName = `${data.persona} - ${nowAt.toISOString().trim('T')[0]} @ ${nowAt.toLocaleString().split(', ')[1]}`;
let newCampaignName = `${data.persona} - ${nowAt.toISOString().split('T')[0]} @ ${nowAt.toLocaleString(undefined, {timezone: 'America/Chicago'}).split(', ')[1]} CT`;
// Now save an incomplete reference to the new LinkedIn campaign.
latestCampaign = await AdCampaign.create({
isLatest: true,