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.
|
|
|
package routes
|
|
|
|
|
|
|
|
import "github.com/gofiber/fiber/v2"
|
|
|
|
|
|
|
|
func (s *Server) PageRoutes(r fiber.Router) {
|
|
|
|
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", s.requireLogged, func(c *fiber.Ctx) error {
|
|
|
|
return c.SendFile("_frontend/dist/partita.html")
|
|
|
|
})
|
|
|
|
}
|