sign in trully sign in

This commit is contained in:
MaximOksiuta
2025-11-21 14:44:30 +03:00
parent 44fc35b6df
commit a3f8fc0221
2 changed files with 2 additions and 3 deletions
@@ -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,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
} }
} }