From a9a4f265284580c2d4171cdca1d008531d7c20b0 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sat, 16 Nov 2024 20:31:36 +0200 Subject: [PATCH] Add routes for transfer --- cmd/http-server/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/http-server/main.go b/cmd/http-server/main.go index 2b17f50..18fce38 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -96,6 +96,14 @@ func main() { expensesRoutes.PUT("/edit/:id", handlers.ExpensePutId) expensesRoutes.DELETE("/delete/:id", handlers.ExpenseDeleteId) } + transfersRoutes := api.Group("/transfer", middleware.AuthMiddleware()) + { + transfersRoutes.POST("/add", handlers.TransferAdd) + transfersRoutes.GET("/:id", handlers.TransferGetId) + transfersRoutes.GET("/all", handlers.TransferGetAll) + transfersRoutes.PUT("/edit/:id", handlers.TransferPutId) + transfersRoutes.DELETE("/delete/:id", handlers.TransferDeleteId) + } } r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))