This commit is contained in:
Lizandro Guarnizo
2025-02-06 14:49:52 -05:00
parent 6d8f1bcd6f
commit 6442e46f13
7 changed files with 126 additions and 46 deletions
+22
View File
@@ -0,0 +1,22 @@
package controllers
import (
"github.com/gofiber/fiber/v2"
)
// RENDER
func Index(c *fiber.Ctx) error {
data := fiber.Map{
//"user": c.Locals("user").(map[string]interface{}),
//"modules": c.Locals("userModules"),
}
// Renderiza la vista con el layout layouts/main
if err := c.Render("index", data, "layouts/public"); err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
"message": "Error rendering template",
"error": err.Error(),
})
}
return nil
}