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: Camera, Mission, Members UseCase 리펙토링 #565

Merged
merged 7 commits into from
Jun 18, 2024

Conversation

Do-hyun-Kim
Copy link
Collaborator

@Do-hyun-Kim Do-hyun-Kim commented Jun 16, 2024

작업 내용 🧑‍💻

  • Camera UseCase 하나의 execute 메서드를 호출 할 수 있도록 책임 분배 하였습니다.
  • Mission, Members 도 Camera와 동일합니다.
  • Camera, Mission, Members 모델 네이밍을 Entity로 리펙토링 하였습니다.
  • Mission에서 사용하지 않는 파일을 제거 하였으며, MissionRepositoryProtocol로 통합 시켰습니다.
  • MissionAPIWorker에서 getTodayMission 메서드는 호출하고 있지 않기 때문에 제거하였습니다.

변경 로직 ⚒️

  • Mission쪽 Domain Layer 로직을 MissionRepositoryProtocol로 통합 시켰습니다. @akrudal 확인 부탁드립니다.
  • MissionAPIWorker에서 getTodayMission 메서드 역시 호출 하고 있는 부분이 없어서 제거 하였습니다.

테스트 케이스 ✅

  • 코드 리펙토링 이후 휴먼 에러 발생이 있는지 확인 하기
  • 정상 적으로 API 통신 및 데이터 호출이 잘 되는지 확인 하기

- Camera Entity 네이밍 수정
- Members UseCase 책임 분리
- Members Entity 네이밍 수정
…into refactor/#562-camera-usecase-logic-modify

* 'develop' of https://github.com/depromeet/14th-team5-iOS:
  refactor: rename usecase and entities  at presentation(#560)
  refactor: post usecase(#560)
  refacotr: realEmoji usecase(#560)
  refactor: reaction(#560)
  [refactor]: mainView usecase(#560)
  feat: 코드 리뷰 반영 (#555)
  feat: BaseContainer, BaseWrapper 코드 구현 (#538)
  feat: 공통 헤더 삽입 코드 수정 (#555)
  feat: SignInRepositoryProtocol 구현 (#555)
  feat: SignInHelper 구현, TokenKeychain이 SignInType을 저장하도록 수정 (#555)
  feat: 구 SignIn 코드 이름을 Account로 변경 (#555)
  feat: TokenKeychain, OAuthRepository 구현 (#555)
  feat: 주석 추가 (#555)
  refactor: SignIn 관련 Helper 코드 리팩토링 (#555)
  feat: OAuth 관련 APIWoker, DTO 구현 (#555)
  refactor: Calendar 관련 UseCase 코드 리팩토링 (#538)
  feat: 순환 참조 문제 수정 (#538)
  feat: CalendarDIContainer 예시 코드 작성 (#538)
  feat: DIContainer 구현 (#538)
- Mission Entity 네이밍 수정
- 사용하지 않는 Mission Repository Protocol 파일 제거
- asObservable 메서드 제거
return CameraDisplayViewReactor(provider: globalState, cameraDisplayUseCase: makeUseCase(), displayData: displayData, missionTitle: missionTitle, cameraType: cameraDisplayType)
return CameraDisplayViewReactor(
provider: globalState,
createPresignedCameraUseCase: CreateCameraUseCase(cameraRepository: makeRepository()),
Copy link
Collaborator

Choose a reason for hiding this comment

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

나중에 Provider도 @injected 로 받아오심 되여~

import RxCocoa

public protocol FetchCameraRealEmojiUploadUseCaseProtocol {
func execute(memberId: String, parameter: CameraCreateRealEmojiParameters) -> Single<CameraCreateRealEmojiEntity?>
Copy link
Collaborator

Choose a reason for hiding this comment

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

혹시 Single Trait 반환하면 flatMap 연산자 쓰면 오류 안나시나요? 그것 땜시 전 Observable로 했는데

Copy link
Collaborator

@rlarjsdn3 rlarjsdn3 left a comment

Choose a reason for hiding this comment

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

수고하셨어요~

@Do-hyun-Kim Do-hyun-Kim merged commit a634a93 into develop Jun 18, 2024
1 check passed
akrudal added a commit that referenced this pull request Jun 21, 2024
akrudal added a commit that referenced this pull request Jun 21, 2024
akrudal added a commit that referenced this pull request Jun 21, 2024
akrudal added a commit that referenced this pull request Jun 23, 2024
akrudal added a commit that referenced this pull request Jun 23, 2024
akrudal added a commit that referenced this pull request Jun 23, 2024
akrudal added a commit that referenced this pull request Jun 23, 2024
akrudal added a commit that referenced this pull request Jun 23, 2024
akrudal added a commit that referenced this pull request Jun 23, 2024
Do-hyun-Kim added a commit that referenced this pull request Jun 23, 2024
…into feat/#567-add-wraaper-inject

* 'develop' of https://github.com/depromeet/14th-team5-iOS:
  rebase
  feat: dicontainer(#565)
  [feat]: wrapper and dependency folder(#565)
  [feat]: add wrapper(#565)
  feat: private으로 접근제어자 수정 (#552)
  feat: private으로 접근제어자 수정 (#547)
  feat: FamilyDIContainer 구현 (#547)
  feat: SignInDIContainer 구현 (#547)
  feat: OAuthDIContainer  구현 (#547)
  feat: PickDIContainer 구현 (#552)
  feat: CommentDIContainer 구현 (#552)
  fix: Keychain의 Key 추가, RefreshToken 갱신 문제 수정 (#564)
  refactor: CommentUseCase 코드 리팩토링 (#553)
  refactor: PickUseCase 코드 리팩토링 (#553)
  refactor: SignInUseCase 코드 리팩토링 (#553)
  refactor: OAuthUseCase 코드 리팩토링 (#553)
  refactor: FamilyUseCase 코드 리팩토링 (#553)
  refactor: CalendarUseCase 코드 리팩토링 (#553)

# Conflicts:
#	14th-team5-iOS/App/Sources/Application/AppDelegate.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants