Add debt CRUD routes

This commit is contained in:
qowevisa 2024-08-12 18:33:17 +03:00
parent 30c7251e64
commit 7adde1fee1

View File

@ -63,6 +63,13 @@ func main() {
categoriesRoutes.PUT("/edit/:id", handlers.CategoryPutId) categoriesRoutes.PUT("/edit/:id", handlers.CategoryPutId)
categoriesRoutes.DELETE("/delete/:id", handlers.CategoryDeleteId) categoriesRoutes.DELETE("/delete/:id", handlers.CategoryDeleteId)
} }
debtRoutes := api.Group("/debt", middleware.AuthMiddleware())
{
debtRoutes.POST("/add", handlers.DebtAdd)
debtRoutes.GET("/:id", handlers.DebtGetId)
debtRoutes.PUT("/edit/:id", handlers.DebtPutId)
debtRoutes.DELETE("/delete/:id", handlers.DebtDeleteId)
}
} }
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))