From a3472f432db436c25ada5788364302c7b10788ec Mon Sep 17 00:00:00 2001 From: Nima Nakhostin Date: Sun, 9 Nov 2025 10:28:09 +0330 Subject: [PATCH] Fix Middleware Usage in CMS Routes - Corrected the middleware usage in the CMS routes by ensuring the AuthMiddleware is applied correctly. - This change enhances the security of the CMS endpoints by enforcing authentication for all CMS-related operations. --- cmd/web/router/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/web/router/routes.go b/cmd/web/router/routes.go index f7e56ae..e7fb714 100644 --- a/cmd/web/router/routes.go +++ b/cmd/web/router/routes.go @@ -158,7 +158,7 @@ func RegisterAdminRoutes(e *echo.Echo, userHandler *user.Handler, companyHandler // Admin CMS Routes cmsGP := adminV1.Group("/cms") { - // cmsGP.Use(userHandler.AuthMiddleware()) + cmsGP.Use(userHandler.AuthMiddleware()) cmsGP.POST("", cmsHandler.Create) cmsGP.GET("", cmsHandler.Search) cmsGP.GET("/:id", cmsHandler.GetByID)