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

refactor: 가족 API Mapper 구조 리팩토링 #240

Merged
merged 7 commits into from
Sep 26, 2022
Merged

Conversation

ozzing
Copy link
Member

@ozzing ozzing commented Sep 26, 2022

📝 PR Summary

  • 컨트롤러 레이어가 너무 무거워짐에 따라 실 컨트롤러는 응답 처리에 관한 로직만 담당하도록 리팩토링
  • 컨트롤러와 서비스 레이어를 연결해주는 Mapper 레이어를 도입하여 여러 서비스를 묶어주는 (현재의 컨트롤러 역할) 역할 담당
  • 컨트롤러 레이어는 Http 메소드명을 따라감 (get, post, patch, put, delete)
  • 매퍼 레이어는 직관적으로
  • 서비스 레이어는 crud 명을 따라감 (create, update, read, delete), 단 애플과 카카오의 경우 디비 조회 없어 메소드명 따라감
  • 가족 API들 Mapper 구조로 리팩토링합니다.
  • 유저 탈퇴 부분 함께 리팩 진행합니다.

🌲 Working Branch

refactor/familyMapper

🌲 TODOs

  • 현 컨트롤러를 Mapper로 명명
  • 메소드명 리네이밍
  • FamilyController - FamilyMapper 분리

Related Issues

#238

@ozzing ozzing added For: API [이슈 대상] 외부 API Type: Refactor [이슈 목적] 프로덕션 코드 리팩토링 labels Sep 26, 2022
@ozzing ozzing added this to the 코드 리팩토링 milestone Sep 26, 2022
@ozzing ozzing requested a review from sanbonai06 September 26, 2022 06:25
@ozzing ozzing self-assigned this Sep 26, 2022
@@ -34,7 +34,7 @@ public User postAppleLogin(MultiValueMap<String, String> formData) throws IOExce
appleKeyListDTO);
AppleTokenDTO appleTokenDTO = appleService.getAppleAccessToken(appleRequest, "login");

Optional<User> registeredUser = userService.readUserByAuthenticationCodeNullable(
Optional<User> registeredUser = userService.findUserByAuthenticationCodeNullable(
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

@sanbonai06 sanbonai06 left a comment

Choose a reason for hiding this comment

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

수고했어요ㅠㅠ...

@ozzing ozzing merged commit 3de094b into dev Sep 26, 2022
@ozzing ozzing deleted the refactor/familyMapper branch September 26, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: API [이슈 대상] 외부 API Type: Refactor [이슈 목적] 프로덕션 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants