Uh oh!
There was an error while loading. Please reload this page.
add a pdf generator for invoices - #665
Conversation
f89cead to
cb24c71Comparecb24c71 to
70768d9Compare26ced02 to
8f86730Compare…ud4students into development_invoices_pdf
| startX float64 = 25 | ||
| startY float64 = 30 | ||
| logoPath = "internal/img/codescalers.png" |
There was a problem hiding this comment.
can we make this name more generic so it can be replaced e.g with threefold logo or any other company?
| // SendMail sends verification mails | ||
| func SendMail(sender, sendGridKey, receiver, subject, bodystring) error { | ||
| func SendMail(sender, sendGridKey, receiver, subject, body, attachmentName string, attachmentBytes ...[]byte) error { |
There was a problem hiding this comment.
I think we can make it a Mailer that can be initialized with a Key e.g NewMailer(sendGridKey)
And then We can SendMail(sender, receiver, subject, body, attachments []Attachment)
and Attachments to be a struct of a name and bytes
| LastReminderAt time.Time `json:"last_reminder_at"` | ||
| CreatedAt time.Time `json:"created_at"` | ||
| PaidAt time.Time `json:"paid_at"` | ||
| FileData []byte `json:"file_data" gorm:"type:blob"` |
There was a problem hiding this comment.
I prefer the option of storing the invoices paths instead of storing the data itself, but if the size of the blob is quite small, then maybe we should go with that
| return nil, InternalServerError(errors.New(internalServerErrorMsg)) | ||
| } | ||
| downloadsDir := filepath.Join(homeDir, "Downloads") |
There was a problem hiding this comment.
Can we make the full downloads home directory configurable and fallback to this if not defined, this allows the operator of the service to e.g mount external drives or use nfs directories .. etc
38f00f7 to
fd0e22bComparefd0e22b to
262861aCompareda94fa0 to
c75afcdCompare
Related Issues