-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: 서기 파트 유즈케이스 적용 #691
base: chongdae
Are you sure you want to change the base?
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.
확실히 추상화를 하지 않아서 그런지 코드가 간단하네요! 수고하셨습니다 서기~~
추가적으로 저희 에러 핸들링 관련해서 토큰 refresh 부분을 interceptor 혹은 call adapter 등등 다른 방식을 사용해보고 싶은데, 오늘 회의에 얘기해보면 좋을듯해요!!
진짜 마지막으로는 usecase 네이밍에 대해서도 컨벤션으로 정리해놓으면 좋을듯함돠!
} | ||
|
||
@Test | ||
fun `offering ID에 해당하는 공모를 가져온다`() = |
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.
test 추가 좋아요~~~~~
📌 관련 이슈
close #690
✨ 작업 내용
홈화면과 공고 상세 화면에 대해서 유즈케이스 적용했습니다!
📚 기타
알송과 다르게 유즈케이스의 인터페이스를 선언하지 않았습니다.
그리고 알송의 방식은 하나의 유즈케이스에 authRepository를 파라미터로 같이 넘겨주고, 그 안에서 refresh를 하고 있는데 현재 저의 코드는 Result가 isError일 경우 단순히 refresh만 하는 것이 아니라, 에러 경우에 따라 error라는 livedata에 값을 넘겨주거나 하는 작업을 하고있어서 알송과 같은 방식은 힘들었습니다.
제 생각에는 authRepository도 별도의 usecase로 만드는게 어떨까 합니다. 알송도 지금은 Error를 refresh에 대해서만 처리하고 있어서 지금 코드가 가능하지만 만약 다른 에러 상황을 대비하려면 현재 구조로는 힘들 것 같습니다. 이 부분은 내일 회의 때 한번 더 얘기 나누면 좋을 것 같아요!