This commit is contained in:
Felipe
2025-02-06 17:36:59 -05:00
parent 6442e46f13
commit 3df5502026
7 changed files with 89 additions and 7 deletions
+22
View File
@@ -0,0 +1,22 @@
package controllers
import (
"github.com/gofiber/fiber/v2"
)
// RENDER
func Login(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("login", data, "layouts/public"); err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
"message": "Error rendering template",
"error": err.Error(),
})
}
return nil
}
+1 -2
View File
@@ -9,10 +9,9 @@ import (
func RutasPublicas(web fiber.Router) {
//web.Get("/", controllers.Landing)
web.Get("/index", controllers.Index)
web.Get("/login", controllers.Login)
web.Get("/ping", Pong)
web.Get("/all-routes", AllRoutes)
web.Get("/do/verify-email", middlewares.ValidateConfirmToken, controllers.VerifyRegisteredEmail)
}