Skip to content

Commit

Permalink
fix(di): add missing bindings for settings import and export use cases (
Browse files Browse the repository at this point in the history
  • Loading branch information
AkesiSeli authored Dec 26, 2024
1 parent d9febf7 commit 9604b16
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.Instanc
import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.MultiCommunityRepository
import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.SettingsRepository
import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.StopWordRepository
import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.DefaultExportSettingsUseCase
import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.DefaultImportSettingsUseCase
import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.ExportSettingsUseCase
import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.ImportSettingsUseCase
import org.kodein.di.DI
import org.kodein.di.bind
import org.kodein.di.instance
Expand Down Expand Up @@ -108,4 +112,19 @@ val persistenceModule =
)
}
}
bind<ImportSettingsUseCase> {
singleton {
DefaultImportSettingsUseCase(
settingsRepository = instance(),
accountRepository = instance(),
)
}
}
bind<ExportSettingsUseCase> {
singleton {
DefaultExportSettingsUseCase(
settingsRepository = instance(),
)
}
}
}

0 comments on commit 9604b16

Please # to comment.