update to support postgresql and add godocs
This commit is contained in:
@@ -8,6 +8,14 @@ import (
|
||||
"vctp/internal/report"
|
||||
)
|
||||
|
||||
// InventoryReportDownload returns the inventory report as an XLSX download.
|
||||
// @Summary Download inventory report
|
||||
// @Description Generates an inventory XLSX report and returns it as a file download.
|
||||
// @Tags reports
|
||||
// @Produce application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
// @Success 200 {file} file "Inventory XLSX report"
|
||||
// @Failure 500 {object} map[string]string "Report generation failed"
|
||||
// @Router /api/report/inventory [get]
|
||||
func (h *Handler) InventoryReportDownload(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -34,6 +42,14 @@ func (h *Handler) InventoryReportDownload(w http.ResponseWriter, r *http.Request
|
||||
w.Write(reportData)
|
||||
}
|
||||
|
||||
// UpdateReportDownload returns the updates report as an XLSX download.
|
||||
// @Summary Download updates report
|
||||
// @Description Generates an updates XLSX report and returns it as a file download.
|
||||
// @Tags reports
|
||||
// @Produce application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
// @Success 200 {file} file "Updates XLSX report"
|
||||
// @Failure 500 {object} map[string]string "Report generation failed"
|
||||
// @Router /api/report/updates [get]
|
||||
func (h *Handler) UpdateReportDownload(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user