From 02c6da146e65c233c3191e12986dd8e1d0de046a Mon Sep 17 00:00:00 2001 From: Stefan Mogeritsch Date: Fri, 10 Apr 2026 12:57:27 +0200 Subject: [PATCH] refactor(billing+entries): remove unused import and adjust tenant transaction signature --- .../billing/service/config/BillingDatabaseConfiguration.kt | 1 - .../mocode/entries/service/tenant/ExposedTenantTransactions.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/services/billing/billing-service/src/main/kotlin/at/mocode/billing/service/config/BillingDatabaseConfiguration.kt b/backend/services/billing/billing-service/src/main/kotlin/at/mocode/billing/service/config/BillingDatabaseConfiguration.kt index 6be9e56c..9cf7b8b2 100644 --- a/backend/services/billing/billing-service/src/main/kotlin/at/mocode/billing/service/config/BillingDatabaseConfiguration.kt +++ b/backend/services/billing/billing-service/src/main/kotlin/at/mocode/billing/service/config/BillingDatabaseConfiguration.kt @@ -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( diff --git a/backend/services/entries/entries-service/src/main/kotlin/at/mocode/entries/service/tenant/ExposedTenantTransactions.kt b/backend/services/entries/entries-service/src/main/kotlin/at/mocode/entries/service/tenant/ExposedTenantTransactions.kt index a0f645c7..167b2b17 100644 --- a/backend/services/entries/entries-service/src/main/kotlin/at/mocode/entries/service/tenant/ExposedTenantTransactions.kt +++ b/backend/services/entries/entries-service/src/main/kotlin/at/mocode/entries/service/tenant/ExposedTenantTransactions.kt @@ -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 tenantTransaction(crossinline block: () -> T): T = transaction { +inline fun 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