live stock update
This commit is contained in:
@@ -20,6 +20,7 @@ type Facade struct {
|
||||
StockRequestController *controllers.StockRequestController
|
||||
CatalogueController *controllers.CatalogueController
|
||||
PosController *controllers.PosController
|
||||
LiveController *controllers.LiveController
|
||||
|
||||
// Held so the NATS consumer can reach the ingest without going through
|
||||
// HTTP. Unexported: everything else should use the controller.
|
||||
@@ -94,6 +95,11 @@ func NewFacade(db *gorm.DB, catalogueDB *gorm.DB) *Facade {
|
||||
posService := services.NewPosService(posRepo, posPresence)
|
||||
posController := controllers.NewPosController(posService)
|
||||
|
||||
// Shares the POS service purely for its outlet-ownership check — the
|
||||
// stream itself reads no database and holds no state beyond its
|
||||
// subscribers.
|
||||
liveController := controllers.NewLiveController(posService)
|
||||
|
||||
return &Facade{
|
||||
UserController: userController,
|
||||
ProductController: productController,
|
||||
@@ -106,6 +112,7 @@ func NewFacade(db *gorm.DB, catalogueDB *gorm.DB) *Facade {
|
||||
StockRequestController: stockRequestController,
|
||||
CatalogueController: catalogueController,
|
||||
PosController: posController,
|
||||
LiveController: liveController,
|
||||
posService: posService,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user