This commit is contained in:
aditya.siregar
2025-04-26 12:23:12 +07:00
parent 09c9a4d59d
commit 06d7b4764f
32 changed files with 581 additions and 208 deletions
+4 -2
View File
@@ -1,6 +1,7 @@
package routes
import (
"enaklo-pos-be/internal/handlers/http"
"enaklo-pos-be/internal/handlers/http/customerauth"
"enaklo-pos-be/internal/handlers/http/discovery"
"enaklo-pos-be/internal/middlewares"
@@ -14,11 +15,12 @@ func RegisterCustomerRoutes(app *app.Server, serviceManager *services.ServiceMan
repoManager *repository.RepoManagerImpl) {
approute := app.Group("/api/v1/customer")
authMiddleware := middlewares.AuthorizationMiddleware(repoManager.Crypto)
authMiddleware := middlewares.CustomerAuthorizationMiddleware(repoManager.Crypto)
serverRoutes := []HTTPHandlerRoutes{
discovery.NewHandler(serviceManager.DiscoverService),
customerauth.NewAuthHandler(serviceManager.AuthSvc, serviceManager.UserSvc, serviceManager.CustomerV2Svc),
customerauth.NewAuthHandler(serviceManager.AuthV2Svc),
http.NewMenuHandler(serviceManager.ProductV2Svc, serviceManager.InProgressSvc),
}
for _, handler := range serverRoutes {