chore: add sign in tests
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 54s
All checks were successful
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 54s
This commit was merged in pull request #188.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"me-fit/db"
|
||||
"me-fit/middleware"
|
||||
"me-fit/service"
|
||||
|
||||
@@ -8,17 +9,17 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func GetHandler(db *sql.DB) http.Handler {
|
||||
func GetHandler(d *sql.DB) http.Handler {
|
||||
var router = http.NewServeMux()
|
||||
|
||||
router.HandleFunc("/", service.HandleIndexAnd404(db))
|
||||
router.HandleFunc("/", service.HandleIndexAnd404(d))
|
||||
|
||||
handlerAuth := NewHandlerAuth(db, service.NewServiceAuthImpl(db))
|
||||
handlerAuth := NewHandlerAuth(d, service.NewServiceAuthImpl(db.NewDbAuthSqlite(d)))
|
||||
|
||||
// Serve static files (CSS, JS and images)
|
||||
router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
|
||||
|
||||
handleWorkout(db, router)
|
||||
handleWorkout(d, router)
|
||||
|
||||
handlerAuth.handle(router)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user