This commit is contained in:
Lizandro Guarnizo
2026-05-01 12:22:58 -05:00
parent 33899bb6ae
commit 80beec57a8
3 changed files with 21 additions and 11 deletions
+5 -3
View File
@@ -12,10 +12,12 @@ import (
func CloudflareConfigPage(c *fiber.Ctx) error {
cfg, _ := models.GetCloudflareConfig()
if err := c.Render("cloudflare", fiber.Map{
"Title": "Cloudflare API",
"Config": cfg,
"Title": "Cloudflare API",
"Config": cfg,
"user": c.Locals("user"),
"modules": c.Locals("userModules"),
}, "layouts/main"); err != nil {
return c.SendStatus(fiber.StatusInternalServerError)
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": err.Error()})
}
return nil
}
+5 -3
View File
@@ -12,10 +12,12 @@ import (
func HostingerConfigPage(c *fiber.Ctx) error {
cfg, _ := models.GetHostingerConfig()
if err := c.Render("hostinger", fiber.Map{
"Title": "Hostinger API",
"Config": cfg,
"Title": "Hostinger API",
"Config": cfg,
"user": c.Locals("user"),
"modules": c.Locals("userModules"),
}, "layouts/main"); err != nil {
return c.SendStatus(fiber.StatusInternalServerError)
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": err.Error()})
}
return nil
}
+11 -5
View File
@@ -10,11 +10,17 @@ func PasarelasPage(c *fiber.Ctx) error {
boldCfg, _ := models.GetBoldConfig()
dlocalCfg, _ := models.GetLastActiveDlocalApi()
return c.Render("pasarelas_pago", fiber.Map{
"Title": "Pasarelas de Pago",
"Bold": boldCfg,
"Dlocal": dlocalCfg,
})
data := fiber.Map{
"Title": "Pasarelas de Pago",
"Bold": boldCfg,
"Dlocal": dlocalCfg,
"user": c.Locals("user"),
"modules": c.Locals("userModules"),
}
if err := c.Render("pasarelas_pago", data, "layouts/main"); err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": err.Error()})
}
return nil
}
// ─── Bold ─────────────────────────────────────────────────────────────────────