fix: migrate sigin to testable code #181
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 49s

This commit is contained in:
2024-10-04 23:25:57 +02:00
parent 3083ff206a
commit d6c1f28b36
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/"))))