chore(auth): finalize test of new structure

This commit is contained in:
2024-09-26 22:43:14 +02:00
committed by Tim Wundenberg
parent 7001a1c2cc
commit 6279a28061
6 changed files with 111 additions and 79 deletions

View File

@@ -13,12 +13,14 @@ func GetHandler(db *sql.DB) http.Handler {
router.HandleFunc("/", service.HandleIndexAnd404(db))
handlerAuth := NewHandlerAuth(db, service.NewServiceAuthImpl(db))
// Serve static files (CSS, JS and images)
router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
handleWorkout(db, router)
handleAuth(db, router)
handlerAuth.handle(router)
return middleware.Logging(middleware.EnableCors(router))
}