You've already forked RekomenciMobile
sign in trully sign in
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ class AuthRepositoryImpl(
|
|||||||
networkRequest<TokenResponse> {
|
networkRequest<TokenResponse> {
|
||||||
url {
|
url {
|
||||||
method = HttpMethod.Post
|
method = HttpMethod.Post
|
||||||
url("/auth/sign_up/email")
|
url("/auth/sign_in/email")
|
||||||
setBody(request.mapToData())
|
setBody(request.mapToData())
|
||||||
contentType(ContentType.Application.Json)
|
contentType(ContentType.Application.Json)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,6 @@
|
|||||||
package com.prodhack.moscow2025.domain.usecase.auth
|
package com.prodhack.moscow2025.domain.usecase.auth
|
||||||
|
|
||||||
import com.prodhack.moscow2025.domain.interfaces.AuthRepository
|
import com.prodhack.moscow2025.domain.interfaces.AuthRepository
|
||||||
import kotlinx.coroutines.flow.Flow
|
|
||||||
import kotlinx.coroutines.flow.firstOrNull
|
import kotlinx.coroutines.flow.firstOrNull
|
||||||
import org.koin.core.annotation.Single
|
import org.koin.core.annotation.Single
|
||||||
|
|
||||||
@@ -9,7 +8,7 @@ import org.koin.core.annotation.Single
|
|||||||
class CheckSessionUseCase(
|
class CheckSessionUseCase(
|
||||||
private val authRepository: AuthRepository
|
private val authRepository: AuthRepository
|
||||||
) {
|
) {
|
||||||
operator suspend fun invoke(): Boolean {
|
suspend operator fun invoke(): Boolean {
|
||||||
return authRepository.fetchLoginState().firstOrNull() == true
|
return authRepository.fetchLoginState().firstOrNull() == true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user