feat: added db transactions abstraction; cleaned up user registration; repos adapted new abstraction: all repos now support transactions, if present in ctx

This commit is contained in:
2026-09-01 14:55:20 +02:00
parent f87b0a0707
commit 2e3e82e776
14 changed files with 219 additions and 145 deletions
+2 -2
View File
@@ -70,8 +70,8 @@ func main() {
}
func seedAdminUser(db *sql.DB, email string, name string, password string) error {
userRepo := repository.NewUserRepo(db)
userService := domain.NewUserService(userRepo)
store := repository.NewStore(db)
userService := domain.NewUserService(store.User)
_, err := userService.CreateUser(context.Background(), email, name, password)
return err