fix: extract html rendering

This commit is contained in:
2024-12-04 21:10:25 +01:00
parent 01ceb9eb33
commit 9e8e595258
6 changed files with 138 additions and 145 deletions

View File

@@ -112,12 +112,14 @@ func createHandler(d *sql.DB, serverSettings *types.ServerSettings) http.Handler
randomService := service.NewRandomServiceImpl()
clockService := service.NewClockServiceImpl()
mailService := service.NewMailServiceImpl(serverSettings)
authService := service.NewAuthServiceImpl(authDb, randomService, clockService, mailService, serverSettings)
workoutService := service.NewWorkoutServiceImpl(workoutDb, randomService, clockService, mailService, serverSettings)
indexHandler := handler.NewIndexHandler(authService, serverSettings)
authHandler := handler.NewHandlerAuth(authService, serverSettings)
workoutHandler := handler.NewWorkoutHandler(workoutService, authService, serverSettings)
render := handler.NewRender(serverSettings)
indexHandler := handler.NewIndexHandler(authService, render)
authHandler := handler.NewHandlerAuth(authService, render)
workoutHandler := handler.NewWorkoutHandler(workoutService, authService, render)
indexHandler.Handle(router)