initial commit 2
This commit is contained in:
25
server/router/notificationroute/router.go
Normal file
25
server/router/notificationroute/router.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package notificationroute
|
||||
|
||||
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 = ""
|
||||
userNotificationRoute = "/:user_uuid/:status"
|
||||
webhookRoute = "/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.GET(rootRoute, ctrl.handle)
|
||||
r.GET(webhookRoute, ctrl.handleSocket)
|
||||
r.GET(userNotificationRoute, ctrl.handleNotification)
|
||||
}
|
||||
Reference in New Issue
Block a user