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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user