fix: create RandomGenerator interface and struct for testing purpose #181
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 49s

This commit is contained in:
2024-10-05 13:49:43 +02:00
parent 6ccae26aea
commit f7934f42db
6 changed files with 125 additions and 55 deletions

View File

@@ -15,8 +15,9 @@ func GetHandler(d *sql.DB, serverSettings *types.ServerSettings) http.Handler {
router.HandleFunc("/", service.HandleIndexAnd404(d, serverSettings))
randomGenerator := service.NewRandomGeneratorImpl()
dbAuth := db.NewDbAuthSqlite(d)
serviceAuth := service.NewServiceAuthImpl(dbAuth, serverSettings)
serviceAuth := service.NewServiceAuthImpl(dbAuth, randomGenerator, serverSettings)
handlerAuth := NewHandlerAuth(d, serviceAuth, serverSettings)
// Serve static files (CSS, JS and images)