fix: more refactoring #181
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 1m43s
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 1m43s
This commit is contained in:
@@ -16,18 +16,21 @@ func GetHandler(d *sql.DB, serverSettings *types.ServerSettings) http.Handler {
|
||||
randomGenerator := service.NewRandomGeneratorImpl()
|
||||
clock := service.NewClockImpl()
|
||||
dbAuth := db.NewDbAuthSqlite(d)
|
||||
dbWorkout := db.NewDbWorkoutSqlite(d)
|
||||
mailService := service.NewMailServiceImpl(serverSettings)
|
||||
serviceAuth := service.NewServiceAuthImpl(dbAuth, randomGenerator, clock, mailService, serverSettings)
|
||||
serviceWorkout := service.NewServiceWorkoutImpl(dbWorkout, randomGenerator, clock, mailService, serverSettings)
|
||||
|
||||
handlerIndex := NewHandlerIndex(d, serviceAuth, serverSettings)
|
||||
handlerAuth := NewHandlerAuth(d, serviceAuth, serverSettings)
|
||||
handlerWorkout := NewHandlerWorkout(d, serviceWorkout, serviceAuth, serverSettings)
|
||||
|
||||
handlerIndex.handle(router)
|
||||
|
||||
// Serve static files (CSS, JS and images)
|
||||
router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
|
||||
|
||||
handleWorkout(d, router, serverSettings)
|
||||
handlerWorkout.handle(router)
|
||||
|
||||
handlerAuth.handle(router)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user