Skip to content

Commit

Permalink
add test campaign
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehobbs committed Mar 9, 2024
1 parent 08efc08 commit 26fc858
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions service/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ var EmailSettings = map[string]struct {
}{
"duck": {FromDomain: "helptheducks.com", Subject: "Prosecute Reichardt Duck Farm for Animal Abuse", To: "[email protected]"},
"sonoma": {FromDomain: "righttorescue.com", Subject: "Prosecute animal cruelty, not animal rescuers", To: "[email protected]"},
"test": {FromDomain: "righttorescue.com", Subject: "Test", To: "[email protected]"},
}
2 changes: 1 addition & 1 deletion service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/components/petition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const Petition = () => {
...(data.zip && { zip: data.zip }),
...(data.city && { city: data.city }),
message: data.message,
campaign: "duck",
token,
},
headers: {
Expand Down

0 comments on commit 26fc858

Please sign in to comment.