Auth Case and Repo done

This commit is contained in:
2025-11-29 15:37:18 +03:00
parent 945b9d347d
commit cbc91ee472
2 changed files with 7 additions and 4 deletions

View File

@@ -7,10 +7,9 @@ object AuthRepository {
private var codeCache: String? = null
suspend fun checkAndSave(text: String): Result<Boolean> {
return NetworkDataSource.checkAuth(text).onSuccess { success ->
if (success) {
codeCache = text
}
return NetworkDataSource.checkAuth(text).mapCatching { success ->
if (success) codeCache = text
success
}
}
}