minor-fix

This commit is contained in:
Untone 2024-01-05 14:17:56 +03:00
parent 2fba6af769
commit 58a91814ae
2 changed files with 2 additions and 5 deletions

View File

@ -99,10 +99,7 @@ func SendEmail(to []string, event string, data map[string]interface{}) error {
mailgunAPIKey := os.Getenv("MAILGUN_API_KEY")
if len(mailgunAPIKey) > 0 {
err = SendMailgun(to, event, data)
if err != nil {
return err
}
return SendMailgun(to, event, data)
}
m := gomail.NewMessage()

View File

@ -56,7 +56,7 @@ func MailgunRest(to string, data map[string]interface{}, subject string, templat
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("failed to send email, status code: %d", resp.StatusCode)
return fmt.Errorf("failed to send email, status: %d", resp.StatusCode)
}
return nil