Upstream sync

This commit is contained in:
Senad Uka
2018-05-18 18:55:00 +02:00
parent 2e5444bed8
commit a9f113b9e9
17 changed files with 227 additions and 43 deletions

View File

@@ -0,0 +1,38 @@
package selfregisterroute
import (
"sync"
"bitbucket.org/nemt/nemt-portal-api/application/applicationservice"
"bitbucket.org/nemt/nemt-portal-api/application/third/eligibility/bcbsi"
"bitbucket.org/nemt/nemt-portal-api/infra/config"
"bitbucket.org/nemt/nemt-portal-api/server/router/routeutils"
"github.com/labstack/echo"
)
var (
instance *controller
once sync.Once
)
type controller struct {
svc *applicationservice.Service
cfg *config.Config
bcbsi *bcbsi.Service
}
func controllerInstance(svc *applicationservice.Service, cfg *config.Config) *controller {
once.Do(func() {
instance = &controller{
svc: svc,
cfg: cfg,
bcbsi: bcbsi.New(cfg),
}
})
return instance
}
func (c *controller) handle(ctx echo.Context) error {
return routeutils.ResponseAPIOK(ctx, "OK")
}