From 9cf82d5301868dfdef35a2a18885a84bd29a0235 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Wed, 14 Aug 2024 18:21:03 +0300 Subject: [PATCH] Add income 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 2198f94..39b2e11 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -70,6 +70,13 @@ func main() { debtRoutes.PUT("/edit/:id", handlers.DebtPutId) debtRoutes.DELETE("/delete/:id", handlers.DebtDeleteId) } + incomeRoutes := api.Group("/income", middleware.AuthMiddleware()) + { + incomeRoutes.POST("/add", handlers.IncomeAdd) + incomeRoutes.GET("/:id", handlers.IncomeGetId) + incomeRoutes.PUT("/edit/:id", handlers.IncomePutId) + incomeRoutes.DELETE("/delete/:id", handlers.IncomeDeleteId) + } } r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))