refactor(core): integrate localDbModule into DI setup and update SyncManager to use named apiClient
Added `localDbModule` to the Koin initialization list in `main.kt` for enhanced modularity. Updated `SyncManager` DI in `SyncModule.kt` to use the named `apiClient` for better dependency resolution. Improved code maintainability.
This commit is contained in:
+3
-2
@@ -1,12 +1,13 @@
|
||||
package at.mocode.frontend.core.sync.di
|
||||
|
||||
import at.mocode.frontend.core.sync.SyncManager
|
||||
import org.koin.core.qualifier.named
|
||||
import org.koin.dsl.module
|
||||
|
||||
/**
|
||||
* Zentrales Koin-Modul für den Sync-Core.
|
||||
*/
|
||||
val syncModule = module {
|
||||
// Provides a singleton instance of SyncManager, using the globally provided HttpClient.
|
||||
single { SyncManager(get()) }
|
||||
// Provides a singleton instance of SyncManager, using the authenticated 'apiClient'.
|
||||
single { SyncManager(get(named("apiClient"))) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user