mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-09 04:06:50 +00:00
16 lines
318 B
Go
16 lines
318 B
Go
package server
|
|
|
|
import (
|
|
"github.com/labstack/echo/v4"
|
|
"github.com/rjNemo/rentease/internal/pdf"
|
|
)
|
|
|
|
func handleCreateInvoicePdf(ps *pdf.PdfService) echo.HandlerFunc {
|
|
return func(c echo.Context) error {
|
|
err := ps.BuildInvoice()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return c.Attachment("tmp.pdf", "tmp.pdf")
|
|
}
|
|
}
|