refactor(billing+entries): remove unused import and adjust tenant transaction signature

This commit is contained in:
2026-04-10 12:57:27 +02:00
parent c1fadac944
commit 02c6da146e
2 changed files with 1 additions and 2 deletions
@@ -9,7 +9,6 @@ import org.jetbrains.exposed.v1.jdbc.transactions.transaction
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Profile
@Configuration
class BillingDatabaseConfiguration(
@@ -6,7 +6,7 @@ import org.jetbrains.exposed.v1.jdbc.transactions.transaction
/**
* Führt einen Exposed-Transaction-Block im Kontext des aktuellen Tenants aus und setzt das Suchpfad-Schema.
*/
suspend inline fun <T> tenantTransaction(crossinline block: () -> T): T = transaction {
inline fun <T> tenantTransaction(crossinline block: () -> T): T = transaction {
val schema = TenantContextHolder.current()?.schemaName
?: error("No tenant in context. Ensure TenantWebFilter is installed and request has X-Event-Id")
// Set search_path for this transaction/connection