Skip to content
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

토큰 데이터 스토어 계층 분리 #180

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Conversation

youlalala
Copy link
Member

@youlalala youlalala commented Nov 27, 2023

Issue

Overview

  • 현재 프로젝트는 데이터 소스 계층이 필요 없으므로, Token Local DataSource 를 Repository 레벨에서 관리하기 위해 UserTokenRepository 로 분리하였습니다.

@youlalala youlalala added this to the 📝 login milestone Nov 27, 2023
@youlalala youlalala self-assigned this Nov 27, 2023
Copy link

github-actions bot commented Nov 27, 2023

Test Results

4 tests   4 ✔️  1s ⏱️
1 suites  0 💤
1 files    0

Results for commit 776757c.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@2taezeat 2taezeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이상 없습니다~ 고생하셨습니다~

@youlalala youlalala linked an issue Nov 27, 2023 that may be closed by this pull request
Copy link
Member

@HamBP HamBP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했어용

Comment on lines -13 to +17
authRepository.loginWithGoogle(googleToken).map { authRepository.saveAccessToken(it) }
authRepository.loginWithGoogle(googleToken).map {
userTokenRepository.saveAccessToken(it)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit -> Unit 이라 map 대신 onEach도 괜찮을 것 같아

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

잘못봤어유

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String -> Unit 이에용 !!

Comment on lines 12 to 17
val accessToken = userTokenRepository.getAccessToken()
return if (accessToken.isNotEmpty()) {
authRepository.verifyToken(accessToken)
} else {
false
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (accessToken.isBlank()) return false

return authRepository.verifyToken(accessToken)

early return을 고려해볼 수 있을 듯!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영완료~

@youlalala youlalala merged commit fe6769e into develop Nov 27, 2023
2 checks passed
@youlalala youlalala deleted the android/feature/179 branch November 27, 2023 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

데이터 스토어 계층 분리
3 participants