Onyx-API/internal/data/routes.go

23 lines
442 B
Go
Raw Permalink Normal View History

2023-09-15 18:21:04 +02:00
package chargers
import (
"onyx-api/internal/config"
"github.com/labstack/echo/v4"
)
type Routes struct {
cfg *config.Config
controller *Controller
}
// New controller constructor
func NewRouter(cfg *config.Config, Controller *Controller) *Routes {
return &Routes{cfg: cfg, controller: Controller}
}
func (r *Routes) MapRoutes(g *echo.Group) {
g.GET("/", r.controller.Ping())
g.GET("/all", r.controller.GetAllProjects())
}