Skip to content

Commit

Permalink
fix: 로깅 추가 (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhz committed Aug 31, 2024
1 parent bc19bf7 commit fee47c6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.easyhz.noffice.domain.home.usecase.splash

import com.easyhz.noffice.core.common.base.BaseUseCase
import com.easyhz.noffice.core.common.util.errorLogging
import com.easyhz.noffice.core.model.splash.EnterScreenType
import com.easyhz.noffice.data.member.repository.user.UserRepository
import javax.inject.Inject
Expand All @@ -10,16 +11,19 @@ class GetSplashInfoUseCase @Inject constructor(
): BaseUseCase<Unit, EnterScreenType>() {
override suspend fun invoke(param: Unit): Result<EnterScreenType> = runCatching {
userRepository.getIsFirstRun().getOrElse {
errorLogging(this.javaClass.name, "Error getting isFirstRun", it)
return@runCatching EnterScreenType.ONBOARDING
}.takeIf { it }?.let {
return@runCatching EnterScreenType.ONBOARDING
}

userRepository.getMemberId().getOrElse {
errorLogging(this.javaClass.name, "Error getting memberId", it)
return@runCatching EnterScreenType.LOGIN
}

userRepository.getMemberName().getOrElse {
errorLogging(this.javaClass.name, "Error getting memberName", it)
return@runCatching EnterScreenType.SIGN_UP
}

Expand Down

0 comments on commit fee47c6

Please sign in to comment.