Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

aider: Added logging of the pin to the log output in the `SendVerificationEmail` function for development mode.

Alan Younga7ebf9461831
diff --git a/app/server/email/verification.go b/app/server/email/verification.go
index e0972b22..a94f911f 100644
--- a/app/server/email/verification.go
+++ b/app/server/email/verification.go
@@ -21,6 +21,11 @@ func SendVerificationEmail(email string, pin string) error {
} else {
return sendEmailViaSES(email, subject, htmlBody, textBody)
}
+func SendVerificationEmail(email string, pin string) error {
+ // Check if the environment is production
+ if os.Getenv("GOENV") == "production" {
+ // Production environment - send email using AWS SES
+ // ... existing code ...
}
if os.Getenv("GOENV") == "development" {
@@ -30,6 +35,8 @@ func SendVerificationEmail(email string, pin string) error {
return fmt.Errorf("error copying pin to clipboard in dev: %v", err)
}
+ // Dump pin to log output
+ fmt.Printf("Development mode: Verification pin is %s for email %s\n", pin, email)
// Send notification
err := beeep.Notify("Verification Pin", fmt.Sprintf("Verification pin %s copied to clipboard %s", pin, email), "")
if err != nil {