1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-2731 Vault | Tech | Fix gateway provider (#1571)

This commit is contained in:
Evgenii Kozlov 2024-09-18 16:06:18 +02:00 committed by GitHub
parent e680126dd1
commit 221e8272d7
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View file

@ -1,15 +1,15 @@
package com.anytypeio.anytype.data.auth.repo.config
import com.anytypeio.anytype.domain.config.ConfigStorage
import com.anytypeio.anytype.domain.config.Gateway
import com.anytypeio.anytype.domain.debugging.Logger
import com.anytypeio.anytype.domain.workspace.SpaceManager
class GatewayProvider(
private val spaceManager: SpaceManager,
private val configStorage: ConfigStorage,
private val logger: Logger
) : Gateway {
override fun provide(): String {
val gateway = spaceManager.getConfig()?.gateway
val gateway = configStorage.getOrNull()?.gateway
if (gateway == null) {
logger.logException(IllegalStateException("Gateway not found"))
}