From ead0a4bd60e9a6a7f992126ce40fc1a9261efad5 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Mon, 18 Nov 2024 09:55:34 +0200 Subject: [PATCH] Add item 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 18fce38..c6502ea 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -104,6 +104,13 @@ func main() { transfersRoutes.PUT("/edit/:id", handlers.TransferPutId) transfersRoutes.DELETE("/delete/:id", handlers.TransferDeleteId) } + itemRoutes := api.Group("/item", middleware.AuthMiddleware()) + { + itemRoutes.GET("/:id", handlers.ItemGetId) + itemRoutes.GET("/all", handlers.ItemGetAll) + itemRoutes.POST("/filter", handlers.ItemPostFilter) + itemRoutes.DELETE("/delete/:id", handlers.ItemDeleteId) + } } r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))