diff --git a/src/main/kotlin/com/fardragi/nyaruko/database/Extensions.kt b/src/main/kotlin/com/fardragi/nyaruko/database/Extensions.kt index 4ad050e..68ae04c 100644 --- a/src/main/kotlin/com/fardragi/nyaruko/database/Extensions.kt +++ b/src/main/kotlin/com/fardragi/nyaruko/database/Extensions.kt @@ -18,7 +18,7 @@ object CustomLogger : SqlLogger { } } -suspend fun query(block: () -> T, dispatcher: CoroutineDispatcher = Dispatchers.IO): T = withContext(dispatcher) { +suspend fun query(dispatcher: CoroutineDispatcher = Dispatchers.IO, block: () -> T): T = withContext(dispatcher) { transaction { addLogger(CustomLogger) block()