File tree Expand file tree Collapse file tree
domain/src/main/java/com/threegap/bitnagil/domain/auth/usecase Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com.threegap.bitnagil.domain.auth.usecase
22
33import com.threegap.bitnagil.domain.auth.repository.AuthRepository
4+ import com.threegap.bitnagil.domain.user.repository.UserRepository
45import javax.inject.Inject
56
67class LogoutUseCase @Inject constructor(
78 private val authRepository : AuthRepository ,
9+ private val userRepository : UserRepository ,
810) {
9- suspend operator fun invoke (): Result <Unit > = authRepository.logout()
11+ suspend operator fun invoke (): Result <Unit > =
12+ authRepository.logout().onSuccess {
13+ userRepository.clearCache()
14+ }
1015}
Original file line number Diff line number Diff line change 11package com.threegap.bitnagil.domain.auth.usecase
22
33import com.threegap.bitnagil.domain.auth.repository.AuthRepository
4+ import com.threegap.bitnagil.domain.user.repository.UserRepository
45import javax.inject.Inject
56
67class WithdrawalUseCase @Inject constructor(
78 private val authRepository : AuthRepository ,
9+ private val userRepository : UserRepository ,
810) {
9- suspend operator fun invoke (reason : String ): Result <Unit > = authRepository.withdrawal(reason)
11+ suspend operator fun invoke (reason : String ): Result <Unit > =
12+ authRepository.withdrawal(reason).onSuccess {
13+ userRepository.clearCache()
14+ }
1015}
You can’t perform that action at this time.
0 commit comments