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:
parent
e680126dd1
commit
221e8272d7
2 changed files with 5 additions and 6 deletions
|
@ -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"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue