fix: connect EmailService to contact form handler
The contact form was logging submissions but never actually sending emails. This commit: - Adds EmailService field to CVHandler - Initializes EmailService in main.go with SMTP config - Calls SendContactForm in HandleContact handler - Updates all test files to pass nil for emailService parameter
This commit is contained in:
@@ -21,7 +21,7 @@ func BenchmarkHome(b *testing.B) {
|
||||
b.Fatalf("Failed to create template manager: %v", err)
|
||||
}
|
||||
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080")
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
@@ -43,7 +43,7 @@ func BenchmarkCVContent(b *testing.B) {
|
||||
b.Fatalf("Failed to create template manager: %v", err)
|
||||
}
|
||||
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080")
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
@@ -65,7 +65,7 @@ func BenchmarkToggleLength(b *testing.B) {
|
||||
b.Fatalf("Failed to create template manager: %v", err)
|
||||
}
|
||||
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080")
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
@@ -101,7 +101,7 @@ func BenchmarkPrepareTemplateData(b *testing.B) {
|
||||
b.Fatalf("Failed to create template manager: %v", err)
|
||||
}
|
||||
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080")
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
@@ -144,7 +144,7 @@ func BenchmarkParallelHome(b *testing.B) {
|
||||
b.Fatalf("Failed to create template manager: %v", err)
|
||||
}
|
||||
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080")
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
|
||||
|
||||
b.ResetTimer()
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
@@ -168,7 +168,7 @@ func BenchmarkParallelToggleLength(b *testing.B) {
|
||||
b.Fatalf("Failed to create template manager: %v", err)
|
||||
}
|
||||
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080")
|
||||
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
|
||||
|
||||
b.ResetTimer()
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
|
||||
Reference in New Issue
Block a user