fix: create RandomGenerator interface and struct for testing purpose #181
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user