fix(emailApi): bug fix for expedition
Build and Push Docker image / build-and-push (push) Successful in 2m11s Details

This commit is contained in:
Valentin Kolb 2024-10-24 19:14:45 +02:00
parent 9984936881
commit 1f8ff8afe9
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ func sendEmails(app *pocketbase.PocketBase, emailRecord *models.Record) {
registry := template.NewRegistry()
// expand the createdMessageRecord to get recipient user and send email notification if recipient is set
if errs := app.Dao().ExpandRecord(emailRecord, []string{"recipients, sender"}, nil); len(errs) > 0 {
if errs := app.Dao().ExpandRecord(emailRecord, []string{"recipients", "sender"}, nil); len(errs) > 0 {
// return new error with all errors
logger.LogErrorF("Error expanding created email record: %v", errs)
emailRecord.Set("errors", fmt.Sprintf("The email was not sent to anyone due to an error."))