-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 토큰 제거 로직 추가 - 에러 로깅 추가
- Loading branch information
Showing
10 changed files
with
77 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
domain/my-page/src/main/java/com/easyhz/noffice/domain/my_page/usecase/WithdrawUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.easyhz.noffice.domain.my_page.usecase | ||
|
||
import android.content.Context | ||
import com.easyhz.noffice.core.common.base.BaseUseCase | ||
import com.easyhz.noffice.core.common.util.errorLogging | ||
import com.easyhz.noffice.data.auth.repository.auth.AuthRepository | ||
import com.easyhz.noffice.domain.notification.usecase.DeleteMessagingTokenUseCase | ||
import javax.inject.Inject | ||
|
||
class WithdrawUseCase @Inject constructor( | ||
private val authRepository: AuthRepository, | ||
private val deleteMessagingTokenUseCase: DeleteMessagingTokenUseCase | ||
): BaseUseCase<Context, Unit>() { | ||
override suspend fun invoke(param: Context): Result<Unit> = runCatching { | ||
deleteMessagingToken() | ||
authRepository.withdraw(param) | ||
} | ||
|
||
private suspend fun deleteMessagingToken() { | ||
deleteMessagingTokenUseCase(Unit).onFailure { e -> | ||
errorLogging(this.javaClass.name, "deleteMessagingToken", e) | ||
throw e | ||
} | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
domain/my-page/src/main/java/com/easyhz/noffice/domain/my_page/usecase/WithdrawUserCase.kt
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
...ava/com/easyhz/noffice/feature/my_page/contract/detail/withdrawal/WithdrawalSideEffect.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package com.easyhz.noffice.feature.my_page.contract.detail.withdrawal | ||
|
||
import androidx.annotation.StringRes | ||
import com.easyhz.noffice.core.common.base.UiSideEffect | ||
|
||
sealed class WithdrawalSideEffect: UiSideEffect() { | ||
data object NavigateToUp: WithdrawalSideEffect() | ||
data object NavigateToLogin: WithdrawalSideEffect() | ||
data class ShowSnackBar(@StringRes val stringId: Int): WithdrawalSideEffect() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters