This commit is contained in:
Lizandro Guarnizo
2026-05-16 13:44:32 -05:00
parent 85595e639e
commit 76a0c28b16
16 changed files with 225 additions and 725 deletions
-5
View File
@@ -11,7 +11,6 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/sujit-baniya/fiber-boilerplate/pkg/models"
"github.com/sujit-baniya/fiber-boilerplate/pkg/services"
)
func FacturasIndex(c *fiber.Ctx) error {
@@ -186,10 +185,6 @@ func UploadFacturaPDF(c *fiber.Ctx) error {
if err := models.UpdateFacturaArchivo(uint(id), savePath, file.Filename); err != nil {
return c.Status(500).JSON(fiber.Map{"error": err.Error()})
}
// Notificar al cliente
if f, err := models.GetFacturaByID(uint(id)); err == nil {
go services.DispatchFacturaSubida(f)
}
return c.JSON(fiber.Map{"ok": true, "archivo": savePath})
}