user devices
This commit is contained in:
+12
-1
@@ -105,6 +105,8 @@ func (a *App) Initialize(cfg *config.Config) error {
|
||||
services.customerPointsService,
|
||||
services.spinGameService,
|
||||
middleware.customerAuthMiddleware,
|
||||
services.userDeviceService,
|
||||
validators.userDeviceValidator,
|
||||
)
|
||||
|
||||
return nil
|
||||
@@ -192,6 +194,7 @@ type repositories struct {
|
||||
customerPointsRepo repository.CustomerPointsRepository
|
||||
otpRepo repository.OtpRepository
|
||||
txManager *repository.TxManager
|
||||
userDeviceRepo *repository.UserDeviceRepositoryImpl
|
||||
}
|
||||
|
||||
func (a *App) initRepositories() *repositories {
|
||||
@@ -238,6 +241,7 @@ func (a *App) initRepositories() *repositories {
|
||||
customerPointsRepo: repository.NewCustomerPointsRepository(a.db),
|
||||
otpRepo: repository.NewOtpRepository(a.db),
|
||||
txManager: repository.NewTxManager(a.db),
|
||||
userDeviceRepo: repository.NewUserDeviceRepositoryImpl(a.db),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,6 +284,7 @@ type processors struct {
|
||||
otpProcessor processor.OtpProcessor
|
||||
fileClient processor.FileClient
|
||||
inventoryMovementService service.InventoryMovementService
|
||||
userDeviceProcessor *processor.UserDeviceProcessorImpl
|
||||
}
|
||||
|
||||
func (a *App) initProcessors(cfg *config.Config, repos *repositories) *processors {
|
||||
@@ -327,6 +332,7 @@ func (a *App) initProcessors(cfg *config.Config, repos *repositories) *processor
|
||||
otpProcessor: otpProcessor,
|
||||
fileClient: fileClient,
|
||||
inventoryMovementService: inventoryMovementService,
|
||||
userDeviceProcessor: processor.NewUserDeviceProcessorImpl(repos.userDeviceRepo),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,11 +369,12 @@ type services struct {
|
||||
customerAuthService service.CustomerAuthService
|
||||
customerPointsService service.CustomerPointsService
|
||||
spinGameService service.SpinGameService
|
||||
userDeviceService service.UserDeviceService
|
||||
}
|
||||
|
||||
func (a *App) initServices(processors *processors, repos *repositories, cfg *config.Config) *services {
|
||||
authConfig := cfg.Auth()
|
||||
authService := service.NewAuthService(processors.userProcessor, authConfig)
|
||||
authService := service.NewAuthService(processors.userProcessor, processors.userDeviceProcessor, authConfig)
|
||||
organizationService := service.NewOrganizationService(processors.organizationProcessor)
|
||||
outletService := service.NewOutletService(processors.outletProcessor)
|
||||
outletSettingService := service.NewOutletSettingService(processors.outletSettingProcessor)
|
||||
@@ -398,6 +405,7 @@ func (a *App) initServices(processors *processors, repos *repositories, cfg *con
|
||||
customerAuthService := service.NewCustomerAuthService(processors.customerAuthProcessor)
|
||||
customerPointsService := service.NewCustomerPointsService(processors.customerPointsProcessor)
|
||||
spinGameService := service.NewSpinGameService(processors.gamePlayProcessor, repos.txManager)
|
||||
userDeviceService := service.NewUserDeviceService(processors.userDeviceProcessor)
|
||||
|
||||
// Update order service with order ingredient transaction service
|
||||
orderService = service.NewOrderServiceImpl(processors.orderProcessor, repos.tableRepo, orderIngredientTransactionService, processors.orderIngredientTransactionProcessor, *repos.productRecipeRepo, repos.txManager)
|
||||
@@ -435,6 +443,7 @@ func (a *App) initServices(processors *processors, repos *repositories, cfg *con
|
||||
customerAuthService: customerAuthService,
|
||||
customerPointsService: customerPointsService,
|
||||
spinGameService: spinGameService,
|
||||
userDeviceService: userDeviceService,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,6 +483,7 @@ type validators struct {
|
||||
rewardValidator validator.RewardValidator
|
||||
campaignValidator validator.CampaignValidator
|
||||
customerAuthValidator validator.CustomerAuthValidator
|
||||
userDeviceValidator *validator.UserDeviceValidatorImpl
|
||||
}
|
||||
|
||||
func (a *App) initValidators() *validators {
|
||||
@@ -501,5 +511,6 @@ func (a *App) initValidators() *validators {
|
||||
rewardValidator: validator.NewRewardValidator(),
|
||||
campaignValidator: validator.NewCampaignValidator(),
|
||||
customerAuthValidator: validator.NewCustomerAuthValidator(),
|
||||
userDeviceValidator: validator.NewUserDeviceValidator(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user