Skip to content

Commit

Permalink
feat: update http server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibaru committed Feb 14, 2024
1 parent a3380ca commit 4ee9212
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/app/infrastructure/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func RunServer(
deleteRoomController := controllers.NewDeleteRoomController(roomService)
updateRoomController := controllers.NewUpdateRoomController(roomService)
updateBoxController := controllers.NewUpdateBoxController(boxService)
updateItemController := controllers.NewUpdateItemController(itemService)

loggerMiddleware := middlewares.NewLoggerMiddleware()
needsAuthMiddleware := middlewares.NewNeedsAuthMiddleware(authService)
Expand Down Expand Up @@ -87,6 +88,7 @@ func RunServer(
authApi.DELETE("/rooms/:roomID", deleteRoomController.Handle)
authApi.PATCH("/rooms/:roomID", updateRoomController.Handle)
authApi.PATCH("/boxes/:boxID", updateBoxController.Handle)
authApi.PATCH("/items/:itemID", updateItemController.Handle)

logger.LogError(e.Start(host + ":" + port))
}

0 comments on commit 4ee9212

Please sign in to comment.