You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
708 B
Go

package routes
import (
"github.com/aziis98/lupus-lite/handlers"
"github.com/gofiber/fiber/v2"
)
func PageRoutes(r fiber.Router, h handlers.Handler) {
r.Get("/",
func(c *fiber.Ctx) error {
return c.SendFile("_frontend/dist/index.html")
})
r.Get("/login",
func(c *fiber.Ctx) error {
return c.SendFile("_frontend/dist/login.html")
})
r.Get("/register",
func(c *fiber.Ctx) error {
return c.SendFile("_frontend/dist/register.html")
})
r.Get("/crea-partita",
func(c *fiber.Ctx) error {
return c.SendFile("_frontend/dist/crea-partita.html")
})
r.Get("/p/:partita",
RequireLogged(h),
func(c *fiber.Ctx) error {
return c.SendFile("_frontend/dist/partita.html")
})
}