diff --git a/core/domain/src/main/java/com/wap/wapp/core/domain/usecase/manage/CheckManagerStatusUseCase.kt b/core/domain/src/main/java/com/wap/wapp/core/domain/usecase/manage/CheckManagerStatusUseCase.kt new file mode 100644 index 00000000..612822d1 --- /dev/null +++ b/core/domain/src/main/java/com/wap/wapp/core/domain/usecase/manage/CheckManagerStatusUseCase.kt @@ -0,0 +1,18 @@ +package com.wap.wapp.core.domain.usecase.manage + +import com.wap.wapp.core.data.repository.manage.ManageRepository +import com.wap.wapp.core.data.repository.user.UserRepository +import javax.inject.Inject + +class CheckManagerStatusUseCase @Inject constructor( + private val manageRepository: ManageRepository, + private val userRepository: UserRepository, +) { + suspend operator fun invoke(): Result { + return runCatching { + val userId = userRepository.getUserId().getOrThrow() + + manageRepository.getManager(userId) + } + } +}