diseno
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user