Add categories routes

This commit is contained in:
qowevisa 2024-08-03 13:40:17 +03:00
parent 7c37151a31
commit 523b90b604

View File

@ -44,6 +44,13 @@ func main() {
cardsRoutes.PUT("/edit/:id", handlers.CardPutId)
cardsRoutes.DELETE("/delete/:id", handlers.CardDeleteId)
}
categoriesRoutes := api.Group("/category", middleware.AuthMiddleware())
{
categoriesRoutes.POST("/add", handlers.CategoryAdd)
categoriesRoutes.GET("/:id", handlers.CategoryGetId)
categoriesRoutes.PUT("/edit/:id", handlers.CategoryPutId)
categoriesRoutes.DELETE("/delete/:id", handlers.CategoryDeleteId)
}
}
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))