21 lines
647 B
Go
21 lines
647 B
Go
package routes
|
|
|
|
import (
|
|
"cds/controllers"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func GroupRoute(route fiber.Router) {
|
|
route.Get("/:id", controllers.GetInfos)
|
|
route.Get("/:id/events", controllers.GetEvents)
|
|
route.Put("/create", controllers.CreateGroup)
|
|
route.Put("/join", controllers.JoinGroup)
|
|
route.Put("/leave", controllers.LeaveGroupe)
|
|
route.Put("/switch", controllers.ChangeLeader)
|
|
route.Put("/events/plan", controllers.CreateEvent)
|
|
route.Put("/events/change", controllers.ChangeEvent)
|
|
route.Put("/end", controllers.EndGroup)
|
|
route.Delete("/cancel", controllers.DeleteGroup)
|
|
route.Delete("/events/cancel", controllers.DeleteEvent)
|
|
}
|