Implementasi HPP std dan real
This commit is contained in:
@@ -46,6 +46,7 @@ type Router struct {
|
||||
customerAuthHandler *handler.CustomerAuthHandler
|
||||
customerPointsHandler *handler.CustomerPointsHandler
|
||||
spinGameHandler *handler.SpinGameHandler
|
||||
hppHandler *handler.HPPHandler
|
||||
authMiddleware *middleware.AuthMiddleware
|
||||
customerAuthMiddleware *middleware.CustomerAuthMiddleware
|
||||
}
|
||||
@@ -108,6 +109,7 @@ func NewRouter(cfg *config.Config,
|
||||
customerAuthValidator validator.CustomerAuthValidator,
|
||||
customerPointsService service.CustomerPointsService,
|
||||
spinGameService service.SpinGameService,
|
||||
hppService *service.HPPServiceImpl,
|
||||
customerAuthMiddleware *middleware.CustomerAuthMiddleware) *Router {
|
||||
|
||||
return &Router{
|
||||
@@ -144,6 +146,7 @@ func NewRouter(cfg *config.Config,
|
||||
customerAuthHandler: handler.NewCustomerAuthHandler(customerAuthService, customerAuthValidator),
|
||||
customerPointsHandler: handler.NewCustomerPointsHandler(customerPointsService),
|
||||
spinGameHandler: handler.NewSpinGameHandler(spinGameService),
|
||||
hppHandler: handler.NewHPPHandler(hppService, transformer.NewTransformer()),
|
||||
authMiddleware: authMiddleware,
|
||||
customerAuthMiddleware: customerAuthMiddleware,
|
||||
productVariantHandler: handler.NewProductVariantHandler(productVariantService, productVariantValidator),
|
||||
@@ -360,6 +363,13 @@ func (r *Router) addAppRoutes(rg *gin.Engine) {
|
||||
analytics.GET("/profit-loss", r.analyticsHandler.GetProfitLossAnalytics)
|
||||
}
|
||||
|
||||
hpp := protected.Group("/hpp")
|
||||
hpp.Use(r.authMiddleware.RequireAdminOrManager())
|
||||
{
|
||||
hpp.GET("/standard", r.hppHandler.GetStandardHPP)
|
||||
hpp.GET("/real", r.hppHandler.GetRealHPP)
|
||||
}
|
||||
|
||||
tables := protected.Group("/tables")
|
||||
tables.Use(r.authMiddleware.RequireAdminOrManager())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user