Rework db package to make it testable

This commit is contained in:
2024-11-21 22:36:12 +01:00
parent 2faefb6db5
commit 807e96a76c
16 changed files with 274 additions and 161 deletions

View File

@@ -1,3 +1,4 @@
// Package main contains the main entry point for the application. It sets up the server, database, and other services, and starts the server.
package main
import (
@@ -61,7 +62,7 @@ func main() {
authMiddleware := auth.NewMiddleware(jwtManager)
// Initialize session service
sessionService := auth.NewSessionService(database.DB, jwtManager)
sessionService := auth.NewSessionService(database, jwtManager)
// Set up router
r := chi.NewRouter()