package types

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

type ControllerInterface interface {
	GetRouter() fiber.Router
}

type Controller struct {
	Router fiber.Router
}

func NewController(app *fiber.App, group string, middleware ...interface{}) *Controller {
	router := app.Group(group)
	for _, m := range middleware {
		router.Use(m)
	}

	return &Controller{
		Router: router,
	}
}
