From 7adde1fee1698ac54a1e0ac25bc230df703c3bea Mon Sep 17 00:00:00 2001 From: qowevisa Date: Mon, 12 Aug 2024 18:33:17 +0300 Subject: [PATCH] Add debt CRUD routes --- cmd/http-server/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/http-server/main.go b/cmd/http-server/main.go index 3bda70b..d80ba2b 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -63,6 +63,13 @@ func main() { categoriesRoutes.PUT("/edit/:id", handlers.CategoryPutId) 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))