diff --git a/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepository.kt b/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepository.kt index 5c87b6cb..b6f0e255 100644 --- a/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepository.kt +++ b/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepository.kt @@ -2,6 +2,7 @@ package io.filmtime.data.trakt.auth import io.filmtime.data.model.GeneralError import io.filmtime.data.model.Result +import io.filmtime.data.model.TraktCodeLogin import io.filmtime.data.model.TraktTokens import kotlinx.coroutines.flow.Flow @@ -14,4 +15,6 @@ interface TraktAuthRepository { suspend fun refreshTokenByAccessToken(accessToken: String) suspend fun logout() + + suspend fun getLoginCode(): Result } diff --git a/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepositoryImpl.kt b/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepositoryImpl.kt index 22129965..5b754229 100644 --- a/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepositoryImpl.kt +++ b/data/trakt-auth/src/main/java/io/filmtime/data/trakt/auth/TraktAuthRepositoryImpl.kt @@ -3,6 +3,7 @@ package io.filmtime.data.trakt.auth import io.filmtime.data.api.trakt.TraktAuthRemoteSource import io.filmtime.data.model.GeneralError import io.filmtime.data.model.Result +import io.filmtime.data.model.TraktCodeLogin import io.filmtime.data.model.TraktTokens import io.filmtime.data.storage.trakt.TraktAuthLocalSource import kotlinx.coroutines.flow.Flow @@ -33,4 +34,7 @@ class TraktAuthRepositoryImpl @Inject constructor( override suspend fun logout() { traktAuthLocalSource.clearAuthTokens() } + + override suspend fun getLoginCode(): Result = + traktAuthRemoteSource.getLoginCode() }