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.
This commit is contained in:
Nima Nakhostin
2025-11-09 10:28:09 +03:30
parent 265ea4a7c6
commit a3472f432d
+1 -1
View File
@@ -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)