fix: migrate sigin to testable code #181

This commit is contained in:
2024-10-04 23:25:57 +02:00
parent abd8663cf3
commit 5b4160b09f
6 changed files with 252 additions and 133 deletions

View File

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