Skip to content

Commit

Permalink
不要なコード削除
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubosaka committed Dec 25, 2024
1 parent 4d50703 commit d722c5b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions api/internals/di/di.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,3 @@ func InitializeServer() (db.Client, *echo.Echo) {

return client, e
}

// テスト用のDI初期化
func InitializeTestServer() *echo.Echo {
client, err := db.ConnectMySQL()
if err != nil {
log.Fatal("db error")
}

crud := abstract.NewCrud(client)

userRepository := repository.NewUserRepository(client, crud)
sessionRepository := repository.NewSessionRepository(client)
userUseCase := usecase.NewUserUseCase(userRepository, sessionRepository)
userController := controller.NewUserController(userUseCase)

healthcheckController := controller.NewHealthCheckController()

e := echo.New()

e.GET("/", healthcheckController.IndexHealthcheck)
e.GET("/users", userController.IndexUser)

return e
}

0 comments on commit d722c5b

Please sign in to comment.