Skip to content

Commit

Permalink
[MERGE] #113 -> develop
Browse files Browse the repository at this point in the history
[FIX/#113] 소셜로그인 서버 수정사항 반영
  • Loading branch information
Marchbreeze authored Aug 18, 2024
2 parents 24a196d + 709c325 commit 84134b3
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 28 deletions.
4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ object AndroidXDependencies {
const val legacy = "androidx.legacy:legacy-support-v4:${Versions.legacySupportVersion}"
const val security = "androidx.security:security-crypto:${Versions.securityVersion}"

const val navigationFragment =
"androidx.navigation:navigation-fragment-ktx:${Versions.navigationVersion}"
const val navigationUi = "androidx.navigation:navigation-ui-ktx:${Versions.navigationVersion}"

const val lifeCycleKtx = "androidx.lifecycle:lifecycle-runtime-ktx:${Versions.lifecycleVersion}"
const val lifecycleJava8 =
"androidx.lifecycle:lifecycle-common-java8:${Versions.lifecycleVersion}"
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object Versions {
const val securityVersion = "1.1.0-alpha06"
const val hiltVersion = "2.46.1"
const val fragmentKtxVersion = "1.5.7"
const val navigationVersion = "2.7.7"
const val coroutinesAndroidVersion = "1.7.1"
const val lifecycleVersion = "2.6.1"
const val ossPluginVersion = "0.10.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import kr.genti.domain.entity.request.AuthRequestModel

@Serializable
data class AuthRequestDto(
@SerialName("token")
val token: String,
@SerialName("oauthPlatform")
val oauthPlatform: String,
@SerialName("accessToken")
val accessToken: String,
) {
companion object {
fun AuthRequestModel.toDto() = AuthRequestDto(token, oauthPlatform)
fun AuthRequestModel.toDto() = AuthRequestDto(accessToken)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import kr.genti.domain.entity.request.SignupRequestModel

@Serializable
data class SignupRequestDto(
@SerialName("birthDate")
val birthDate: String,
@SerialName("birthYear")
val birthYear: String,
@SerialName("sex")
val sex: String,
) {
companion object {
fun SignupRequestModel.toDto() = SignupRequestDto(birthDate, sex)
fun SignupRequestModel.toDto() = SignupRequestDto(birthYear, sex)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ data class SignUpUserDto(
val lastLoginOauthPlatform: String,
@SerialName("nickname")
val nickname: String,
@SerialName("birthDate")
val birthDate: String,
@SerialName("birthYear")
val birthYear: String,
@SerialName("sex")
val sex: String,
) {
fun toModel() = SignUpUserModel(email, lastLoginOauthPlatform, nickname, birthDate, sex)
fun toModel() = SignUpUserModel(email, lastLoginOauthPlatform, nickname, birthYear, sex)
}
2 changes: 1 addition & 1 deletion data/src/main/java/kr/genti/data/service/AuthService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface AuthService {
@Body request: ReissueRequestDto,
): BaseResponse<ReissueTokenDto>

@POST("auth/v1/login/oauth2/token")
@POST("auth/v1/login/oauth2/token/kakao")
suspend fun postOauthDataToGetToken(
@Body request: AuthRequestDto,
): BaseResponse<AuthTokenDto>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package kr.genti.domain.entity.request

data class AuthRequestModel(
val token: String,
val oauthPlatform: String,
val accessToken: String,
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package kr.genti.domain.entity.request

data class SignupRequestModel(
val birthDate: String,
val birthYear: String,
val sex: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ data class SignUpUserModel(
val email: String,
val lastLoginOauthPlatform: String,
val nickname: String,
val birthDate: String,
val birthYear: String,
val sex: String,
)
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "j
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
androidx-navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigationFragmentKtx" }
androidx-navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigationUiKtx" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
Expand Down
8 changes: 5 additions & 3 deletions presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ dependencies {
implementation(appCompat)
implementation(constraintLayout)
implementation(fragment)
implementation(navigationFragment)
implementation(navigationUi)
implementation(startup)
implementation(legacy)
implementation(security)
Expand All @@ -68,9 +70,9 @@ dependencies {
kapt(hiltWorkManagerCompiler)
}

implementation(MaterialDesignDependencies.materialDesign)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
MaterialDesignDependencies.run {
implementation(materialDesign)
}

TestDependencies.run {
testImplementation(jUnit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class LoginViewModel

private fun changeTokenFromServer(accessToken: String) {
viewModelScope.launch {
authRepository.postOauthDataToGetToken(AuthRequestModel(accessToken, KAKAO))
authRepository.postOauthDataToGetToken(AuthRequestModel(accessToken))
.onSuccess {
with(userRepository) {
setTokens(it.accessToken, it.refreshToken)
Expand All @@ -75,8 +75,4 @@ class LoginViewModel
}
}
}

companion object {
const val KAKAO = "KAKAO"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class SignupActivity : BaseActivity<ActivitySignupBinding>(R.layout.activity_sig
updateProperties("user_email", state.data.email)
updateProperties("user_platform", state.data.lastLoginOauthPlatform)
updateProperties("user_nickname", state.data.nickname)
updateProperties("user_birth_date", state.data.birthDate)
updateProperties("user_birth_year", state.data.birthYear)
updateProperties("user_sex", state.data.sex)
updateIntProperties("user_share", 0)
updateIntProperties("user_picturedownload", 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SignupViewModel
checkAllSelected()
}

fun checkAllSelected() {
private fun checkAllSelected() {
isAllSelected.value = isGenderSelected.value == true && isYearSelected.value == true
}

Expand Down

0 comments on commit 84134b3

Please sign in to comment.