본인인증 완료

- 남성이면 남성향, 여성이면 여성향으로 콘텐츠 보기 설정이 변경되도록 수정
This commit is contained in:
klaus 2025-02-06 20:28:50 +09:00
parent 09209c150f
commit c7b238f975
3 changed files with 12 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import kr.co.vividnext.sodalive.base.BaseViewModel
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.mypage.auth.AuthRepository
import kr.co.vividnext.sodalive.mypage.auth.AuthVerifyRequest
import kr.co.vividnext.sodalive.settings.ContentType
import kr.co.vividnext.sodalive.user.UserRepository
class MyPageViewModel(
@ -71,7 +72,13 @@ class MyPageViewModel(
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{
if (it.success) {
if (it.success && it.data != null) {
SharedPreferenceManager.contentPreference = if (it.data.gender == 0) {
ContentType.FEMALE.ordinal
} else {
ContentType.MALE.ordinal
}
onSuccess()
} else {
if (it.message != null) {

View File

@ -11,5 +11,5 @@ interface AuthApi {
fun verify(
@Body request: AuthVerifyRequest,
@Header("Authorization") authHeader: String
): Single<ApiResponse<Any>>
): Single<ApiResponse<AuthResponse>>
}

View File

@ -0,0 +1,3 @@
package kr.co.vividnext.sodalive.mypage.auth
data class AuthResponse(val gender: Int)