online-order/api/middlewares/router.go

14 lines
340 B
Go
Raw Normal View History

2023-10-27 09:51:58 +00:00
package middlewares
import (
"online-order/entity"
2023-10-27 22:12:56 +00:00
"online-order/repository/product"
2023-10-27 09:51:58 +00:00
)
func NewMiddlewareRouters(server *entity.Routers) *controller {
2023-10-27 22:12:56 +00:00
productRepo := repository_product.NewProductClient(server.Database)
authService := service_authentication.NewAuthService(productRepo)
2023-10-27 09:51:58 +00:00
return NewMiddlewareControllers(authService)
}