Skip to content

Commit

Permalink
[WEAV-FIX] 회원가입 & 번호 인증 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
moondev03 committed Dec 8, 2024
1 parent 1014b63 commit e37c0c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 7 additions & 3 deletions 3days/data/src/main/java/com/weave/data/utils/AuthInterceptor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ class AuthInterceptor @Inject constructor(
}
}
} else {
logDebug { Log.d(TAG, "No auth token available") }
restartApp()
this
if (this.headers.names().contains("X-Register-Token")) {
this
} else {
logDebug { Log.d(TAG, "No auth token available") }
restartApp()
this
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,8 @@ class MobileEnterAuthViewModel @Inject constructor(
authCodeId = uiState.authCodeId ?: UUID.fromString(""), verifyCode = inputCode
).mapMerge().collect {
if (it != null) {
setState { copy(isVerified = true) }
setEffect { AuthEffect.NavigateToRegisterFlow(it.registerToken) }
} else {
setState { copy(errorMessage = context.getString(R.string.mobile_auth_verify_error_message)) }
} else if (!isLoading) {
setEffect {
AuthEffect.ShowToast(
context.getString(R.string.mobile_auth_verify_error_message),
Expand All @@ -148,10 +146,8 @@ class MobileEnterAuthViewModel @Inject constructor(
authCodeId = uiState.authCodeId ?: UUID.fromString(""), verifyCode = inputCode
).mapMerge().collect {
if (it != null) {
setState { copy(isVerified = true) }
setEffect { AuthEffect.NavigateToMainScreen }
} else {
setState { copy(errorMessage = context.getString(R.string.mobile_auth_verify_error_message)) }
} else if (!isLoading) {
setEffect {
AuthEffect.ShowToast(
context.getString(R.string.mobile_auth_verify_error_message),
Expand Down

0 comments on commit e37c0c2

Please sign in to comment.