22 lines
673 B
Go
22 lines
673 B
Go
package twilioroute
|
|
|
|
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 = ""
|
|
wsRoute = "/ws"
|
|
)
|
|
|
|
// 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.handleTwilio)
|
|
r.GET(wsRoute, ctrl.handleSocket)
|
|
}
|