package api

import (
	"github.com/gofiber/fiber/v2"

	"wucher/internal/service"
	"wucher/internal/transport/http/handlers"
	"wucher/internal/transport/http/middleware"
)

func registerFlightRoutes(v1 fiber.Router, flightHandler *handlers.FlightHandler, authMiddleware fiber.Handler, authSvc *service.AuthService) {
	flights := v1.Group("/flights", authMiddleware)
	flights.Get("/get-all", middleware.PermissionRequired(authSvc, "flight.read"), flightHandler.List)
	flights.Get("/get", middleware.PermissionRequired(authSvc, "flight.read"), flightHandler.GetByAuthUser)
}
