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 { 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/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/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 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 ) }