Возможность переподключения к remote vault
This commit is contained in:
@@ -85,6 +85,16 @@ class VaultsManager(
|
||||
yandexAccountStore.deleteByVaultUuid(vaultUuid.toString())
|
||||
}
|
||||
|
||||
override suspend fun retry(vaultUuid: UUID): Boolean = withContext(ioDispatcher) {
|
||||
val account = yandexAccountStore.getByVaultUuid(vaultUuid.toString()) ?: return@withContext false
|
||||
yandexAccountStore.updateCredentials(
|
||||
vaultUuid = account.vaultUuid,
|
||||
email = account.email,
|
||||
token = account.oauthToken,
|
||||
)
|
||||
true
|
||||
}
|
||||
|
||||
private suspend fun registerYandex(registration: YandexRegistration) {
|
||||
val token = registration.oauthToken
|
||||
val info = yandexUserInfoRepository.userInfo(token)
|
||||
|
||||
Reference in New Issue
Block a user