initial commit 2

This commit is contained in:
Senad Uka
2018-04-25 13:16:36 +02:00
parent c1520d169c
commit 99c10b75fb
167 changed files with 25057 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package lyfthookroute
import (
"bitbucket.org/nemt/nemt-portal-api/application/applicationservice"
"bitbucket.org/nemt/nemt-portal-api/application/notificationservice"
"bitbucket.org/nemt/nemt-portal-api/application/tncservice"
"bitbucket.org/nemt/nemt-portal-api/infra/config"
"github.com/labstack/echo"
)
const (
rootRoute = ""
stateChangeRoute = "/:ride_uuid/:status"
)
// Register authenticate route
func Register(r *echo.Group, cfg *config.Config, svc *applicationservice.Service, tnc *tncservice.Service, notification *notificationservice.Service) {
ctrl := controllerInstance(cfg, svc, tnc, notification)
r.POST(rootRoute, ctrl.handle)
if cfg.App.Debug {
r.GET(stateChangeRoute, ctrl.handleStateChange)
}
}