Upstream sync
This commit is contained in:
@@ -2,6 +2,7 @@ package visitroute
|
||||
|
||||
import (
|
||||
"bitbucket.org/nemt/nemt-portal-api/application/applicationservice"
|
||||
"bitbucket.org/nemt/nemt-portal-api/application/tncservice"
|
||||
"bitbucket.org/nemt/nemt-portal-api/infra/config"
|
||||
"github.com/labstack/echo"
|
||||
)
|
||||
@@ -9,13 +10,15 @@ import (
|
||||
const (
|
||||
rootRoute = "/"
|
||||
idRoute = "/:visit_uuid"
|
||||
rideRoute = "/:visit_uuid/ride"
|
||||
)
|
||||
|
||||
// Register registers the routes in the echo group
|
||||
func Register(r *echo.Group, cfg *config.Config, svc *applicationservice.Service) {
|
||||
ctrl := controllerInstance(svc, cfg)
|
||||
func Register(r *echo.Group, cfg *config.Config, svc *applicationservice.Service, tnc *tncservice.Service) {
|
||||
ctrl := controllerInstance(svc, cfg, tnc)
|
||||
|
||||
r.POST(rootRoute, ctrl.handle)
|
||||
r.POST(rideRoute, ctrl.handleRide)
|
||||
|
||||
r.GET(rootRoute, ctrl.handleGetAll)
|
||||
r.GET(idRoute, ctrl.handleGetByID)
|
||||
|
||||
Reference in New Issue
Block a user