diff --git a/emailApi/main.go b/emailApi/main.go index 12274ee..3dae715 100644 --- a/emailApi/main.go +++ b/emailApi/main.go @@ -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."))