본인인증 완료
- 남성이면 남성향, 여성이면 여성향으로 콘텐츠 보기 설정이 변경되도록 수정
This commit is contained in:
@@ -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) {
|
||||
|
@@ -11,5 +11,5 @@ interface AuthApi {
|
||||
fun verify(
|
||||
@Body request: AuthVerifyRequest,
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<Any>>
|
||||
): Single<ApiResponse<AuthResponse>>
|
||||
}
|
||||
|
@@ -0,0 +1,3 @@
|
||||
package kr.co.vividnext.sodalive.mypage.auth
|
||||
|
||||
data class AuthResponse(val gender: Int)
|
Reference in New Issue
Block a user