-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat/#41] sharedpreferences + SignIn + SignUp 분기 처리 및 연결 #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
합격이요.
@@ -33,7 +33,7 @@ android { | |||
gradleLocalProperties(rootDir).getProperty("native.app.key"), | |||
) | |||
manifestPlaceholders["NATIVE_APP_KEY"] = | |||
gradleLocalProperties(rootDir).getProperty("native.app.key") | |||
gradleLocalProperties(rootDir).getProperty("nativeAppKey") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
후후
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!! 김상호 그는 신이야!!!
override suspend fun postLogin( | ||
Authorization: String, | ||
platform: SignInRequestDto, | ||
): BaseResponse<AuthResponseDto> = | ||
authService.postSignin(Authorization, platform) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Login이랑 SignIn 중에 하나로 통일 부탁드려요 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네~~~~ 수정하다가 저거 빼먹었네욤 하하
) : AuthRepository { | ||
override suspend fun postSignIn( | ||
Authorization: String, | ||
data: RequestSignInModel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요것두 data 말고 아래처럼 request~로 가면 더 좋을듯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인입니다!
fun getAccessToken(): String | ||
fun setTokens(accessToken: String, refreshToken: String) | ||
|
||
fun getRefreshToken(): String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
줄바꿈 확인좀요 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
바꾸는김에 getter끼리 모아줬어요~
_postChangeTokenState.value = when (errorCode) { | ||
SIGN_UP -> SignInState.SIGN_UP | ||
TENDENCY -> SignInState.TENDENCY | ||
else -> SignInState.FAIL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋네요.
const val KAKAO = "kakao" | ||
const val MAX_NAME_LEN = 3 | ||
const val MAX_INFO_LEN = 20 | ||
const val SIGN_UP = "e4041" | ||
const val TENDENCY = "e4045" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
토큰 부분은 나중에 저도 공부해보고 싶네욤,, 수고하셨습니다!!
fun toErrorCode(throwable: Throwable): String = if (throwable is HttpException) { | ||
val jsonTemp = throwable.response()?.errorBody()?.byteString().toString() | ||
val json = jsonTemp.slice(6 until jsonTemp.length) | ||
JSONObject(json).getString("code") | ||
} else { | ||
"NOT_HTTP" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확장함수 잘 사용하겠습니다!
sealed interface SignInState { | ||
object LOADING : SignInState | ||
object SUCCESS : SignInState | ||
object FAIL : SignInState | ||
object SIGN_UP : SignInState | ||
object TENDENCY : SignInState | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오호 참고하겠습니다~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 어렵고 복잡하고 중요한 걸 해낸 당신 왕따봉 드립니다!
저도 추후에 꼭 공부해서 모르는 거 있으면 또 물어볼게요 체👍👍👍👍👍😎😎😎😎😎👁️👁️
when (state) { | ||
SignInState.SUCCESS -> navigateToMainScreen() | ||
SignInState.SIGN_UP -> navigateToOnboardingScreen() | ||
SignInState.TENDENCY -> navigateToTendencyScreen() | ||
SignInState.FAIL -> toast(getString(R.string.server_error)) | ||
SignInState.LOADING -> {} | ||
} | ||
}.launchIn(lifecycleScope) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skrrr.... 좋습니다
⛳️ Work Description
📢 To Reviewers