From ce164ef4997590d6e32edee45d04fe81a94b22e9 Mon Sep 17 00:00:00 2001 From: ignacior Date: Mon, 12 Feb 2024 09:28:21 -0500 Subject: [PATCH] feat: update http server --- internal/app/infrastructure/http/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/app/infrastructure/http/server.go b/internal/app/infrastructure/http/server.go index 72c45a2..01ff5f5 100644 --- a/internal/app/infrastructure/http/server.go +++ b/internal/app/infrastructure/http/server.go @@ -55,6 +55,7 @@ func RunServer( getRoomsController := controllers.NewGetRoomsController(roomService) getBoxesController := controllers.NewGetBoxesController(boxService) getItemsController := controllers.NewGetItemsController(assetService, itemService) + transferItemController := controllers.NewTransferItemController(boxService) loggerMiddleware := middlewares.NewLoggerMiddleware() needsAuthMiddleware := middlewares.NewNeedsAuthMiddleware(authService) @@ -77,6 +78,7 @@ func RunServer( authApi.GET("/rooms", getRoomsController.Handle) authApi.GET("/boxes", getBoxesController.Handle) authApi.GET("/items", getItemsController.Handle) + authApi.POST("/boxes/:boxID/items/:itemID/transfer", transferItemController.Handle) logger.LogError(e.Start(host + ":" + port)) }