Skip to content

Commit 9a212c9

Browse files
committed
[Core] Add database module
1 parent 8191a69 commit 9a212c9

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

app/src/main/kotlin/de/davis/keygo/app/di/Koin.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package de.davis.keygo.app.di
22

33
import android.content.Context
44
import de.davis.keygo.auth.di.AuthModule
5+
import de.davis.keygo.core.data.local.datasource.KeyGoDatabase
56
import de.davis.keygo.core.di.coreModule
67
import de.davis.keygo.dashboard.di.DashboardModule
78
import de.davis.keygo.item.di.ItemModule
@@ -13,5 +14,11 @@ fun KoinApplication.init(androidContext: Context) {
1314
androidContext(androidContext)
1415

1516
// modules
16-
modules(coreModule, AuthModule.module, DashboardModule.module, ItemModule.module)
17+
modules(
18+
KeyGoDatabase.koinModule,
19+
coreModule,
20+
AuthModule.module,
21+
DashboardModule.module,
22+
ItemModule.module
23+
)
1724
}

app/src/main/kotlin/de/davis/keygo/core/data/local/datasource/KeyGoDatabase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class KeyGoDatabase : RoomDatabase() {
2121
internal abstract fun passwordDao(): PasswordDao
2222

2323
companion object {
24-
internal val koinModule = module {
24+
val koinModule = module {
2525
single { create(get()) }
2626

2727
singleOf(KeyGoDatabase::vaultDao)

0 commit comments

Comments
 (0)