From 6afb48436296d85f3f055051a5801e35a00172ff Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Fri, 30 Aug 2024 01:16:52 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[FEAT/#208]=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=84=9C=EB=B2=84=20=EC=A3=BC=EC=86=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e01b17572..e53028e48 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -38,7 +38,7 @@ android { buildConfigField( "String", "BASE_URL", - gradleLocalProperties(rootDir, providers).getProperty("base.url") + gradleLocalProperties(rootDir, providers).getProperty("test.base.url") ) } release { From 2c990b586b2bfa3bfcd1536b3b983678bf866f8c Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Sat, 31 Aug 2024 23:34:23 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[FIX/#208]=20=ED=86=A0=ED=81=B0=20=EC=9E=AC?= =?UTF-8?q?=EB=B0=9C=EA=B8=89=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/terning/point/di/AuthInterceptor.kt | 8 ++++---- .../java/com/terning/domain/entity/auth/TokenReissue.kt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/terning/point/di/AuthInterceptor.kt b/app/src/main/java/com/terning/point/di/AuthInterceptor.kt index cc8680022..43de4f28b 100644 --- a/app/src/main/java/com/terning/point/di/AuthInterceptor.kt +++ b/app/src/main/java/com/terning/point/di/AuthInterceptor.kt @@ -26,9 +26,9 @@ class AuthInterceptor @Inject constructor( override fun intercept(chain: Interceptor.Chain): Response { val originalRequest = chain.request() - Timber.d("GET REFRESH TOKEN : ${terningDataStore.refreshToken}") + Timber.d("GET ACCESS TOKEN : ${terningDataStore.accessToken}") - val authRequest = if (terningDataStore.refreshToken.isNotBlank()) { + val authRequest = if (terningDataStore.accessToken.isNotBlank()) { originalRequest.newBuilder().newAuthBuilder().build() } else { originalRequest @@ -45,7 +45,7 @@ class AuthInterceptor @Inject constructor( ) }.onSuccess { data -> terningDataStore.apply { - refreshToken = data.refreshToken + accessToken = data.accessToken } response.close() @@ -77,7 +77,7 @@ class AuthInterceptor @Inject constructor( } private fun Request.Builder.newAuthBuilder() = - this.addHeader(AUTHORIZATION, "$BEARER ${terningDataStore.refreshToken}") + this.addHeader(AUTHORIZATION, "$BEARER ${terningDataStore.accessToken}") companion object { private const val CODE_TOKEN_EXPIRED = 401 diff --git a/domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt b/domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt index 9841acf59..933015dfc 100644 --- a/domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt +++ b/domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt @@ -1,5 +1,5 @@ package com.terning.domain.entity.auth data class TokenReissue ( - val refreshToken : String + val accessToken : String ) \ No newline at end of file From dd016d79c3c2c57e2fba30c3b679c782c767a15d Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Sat, 31 Aug 2024 23:50:35 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[FIX/#208]=20=ED=86=A0=EA=B7=BC=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../terning/data/dto/response/TokenReissueResponseDto.kt | 4 ++-- .../java/com/terning/data/mapper/auth/TokenReissueMapper.kt | 2 +- .../com/terning/feature/onboarding/signup/SignUpRoute.kt | 4 ++-- .../com/terning/feature/onboarding/signup/SignUpState.kt | 2 +- .../terning/feature/onboarding/signup/SignUpViewModel.kt | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt b/data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt index 56647b905..91cca0810 100644 --- a/data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt +++ b/data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt @@ -5,6 +5,6 @@ import kotlinx.serialization.Serializable @Serializable data class TokenReissueResponseDto( - @SerialName("refreshToken") - val refreshToken: String + @SerialName("accessToken") + val accessToken: String ) \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt b/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt index 90e2e964f..176698aa6 100644 --- a/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt +++ b/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt @@ -4,4 +4,4 @@ import com.terning.data.dto.response.TokenReissueResponseDto import com.terning.domain.entity.auth.TokenReissue fun TokenReissueResponseDto.toTokenReissue(): TokenReissue = - TokenReissue(refreshToken = refreshToken) + TokenReissue(accessToken = accessToken) diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt index 61dce1b1d..f6bdda5f4 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt @@ -105,7 +105,7 @@ fun SignUpScreen( showBottomSheet = false onFetchCharacter(index) }, - initialSelectedOption = signUpState.character + initialSelectedOption = signUpState.profileImage ) } Text( @@ -126,7 +126,7 @@ fun SignUpScreen( modifier = modifier.noRippleClickable { showBottomSheet = true }, - index = signUpState.character + index = signUpState.profileImage ) } Column( diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt index 9874f996d..5cc946587 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt @@ -8,7 +8,7 @@ import com.terning.feature.R data class SignUpState( val name: String = "", - val character: Int = 0, + val profileImage: Int = 0, val drawLineColor: Color = Grey500, @StringRes val helper: Int = R.string.sign_up_helper, val helperIcon: Int? = null, diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt index 52f46f86f..3fcb5f02f 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt @@ -80,8 +80,8 @@ class SignUpViewModel @Inject constructor( } } - fun fetchCharacter(character: Int) { - _state.value = _state.value.copy(character = character) + fun fetchCharacter(profileImage: Int) { + _state.value = _state.value.copy(profileImage = profileImage) } fun fetchAuthId(authId: String) { @@ -95,7 +95,7 @@ class SignUpViewModel @Inject constructor( state.value.run { SignUpRequest( name = name, - profileImage = character, + profileImage = profileImage, authType = KAKA0 ) }