|
|
|
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")
|
|
|
|
})
|
|
|
|
}
|