Rework mailer database schema, add UUID to mailers
At this point, I sent out our first test mailers for Delta.
This commit is contained in:
parent
a7bb6181c7
commit
a0eee3a95f
24 changed files with 2662 additions and 247 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/Gleipnir-Technology/nidus-sync/html"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/platform/pdf"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type contentMailer struct {
|
||||
|
|
@ -68,9 +69,10 @@ func getMailerPreview(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, "no comp", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
doc_id := uuid.New()
|
||||
html.RenderOrError(w, "sync/mailer.html", contentMailer{
|
||||
Config: newContentConfig(),
|
||||
DocumentID: "00000000-0000-0000-0000-000000000000",
|
||||
DocumentID: doc_id.String(),
|
||||
LogoURL: config.MakeURLNidus("/api/district/%s/logo", org.Slug.GetOr("unset")),
|
||||
Organization: org,
|
||||
PoolImageURL: config.MakeURLNidus("/api/compliance-request/image/pool/%s", code),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue