From 26fc8584063b0a0109ca952327532f2f8f90805e Mon Sep 17 00:00:00 2001 From: Jake Hobbs Date: Fri, 8 Mar 2024 20:18:01 -0800 Subject: [PATCH] add test campaign --- service/config/config.go | 1 + service/main.go | 2 +- src/components/petition.tsx | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/service/config/config.go b/service/config/config.go index 7e9673e..aea047b 100644 --- a/service/config/config.go +++ b/service/config/config.go @@ -25,4 +25,5 @@ var EmailSettings = map[string]struct { }{ "duck": {FromDomain: "helptheducks.com", Subject: "Prosecute Reichardt Duck Farm for Animal Abuse", To: "carla.rodriguez@sonoma-county.org"}, "sonoma": {FromDomain: "righttorescue.com", Subject: "Prosecute animal cruelty, not animal rescuers", To: "carla.rodriguez@sonoma-county.org"}, + "test": {FromDomain: "righttorescue.com", Subject: "Test", To: "tech@directactioneverywhere.com"}, } diff --git a/service/main.go b/service/main.go index 114274a..eb69cbc 100644 --- a/service/main.go +++ b/service/main.go @@ -81,7 +81,7 @@ func processNewMessages() { settings, ok := config.EmailSettings[message.Campaign.String] if !ok { - settings = config.EmailSettings["duck"] + settings = config.EmailSettings["test"] } fromEmail := strings.Join(strings.Split(strings.ToLower(message.Name), " "), ".") + "@" + settings.FromDomain diff --git a/src/components/petition.tsx b/src/components/petition.tsx index 45844ac..7857082 100644 --- a/src/components/petition.tsx +++ b/src/components/petition.tsx @@ -121,6 +121,7 @@ export const Petition = () => { ...(data.zip && { zip: data.zip }), ...(data.city && { city: data.city }), message: data.message, + campaign: "duck", token, }, headers: {