-
Notifications
You must be signed in to change notification settings - Fork 0
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
피드 상세화면에 필요한 Domain영역과 Data 영역을 정의해 보았습니다. #13
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6eb97ea
Feat: RecipeDetailDTO정의
GeonH0 bab43de
Feat: RecipeDetailFetchService 정의
GeonH0 4b09f04
Feat: RecipeDetailRepository 정의
GeonH0 3f7f570
Feat: FetchRecipeDetailUseCase 정의
GeonH0 429a962
Feat: RecipeDetailInteractor 정의
GeonH0 6178184
Fix: recipeID로 네이밍 수정
GeonH0 e117629
Fix: RecipeDetailFetchServiceImpl final 추가
GeonH0 8f79c55
Feat: RecipeError 정의
GeonH0 c91393f
Fix: 정의된 Error 적용
GeonH0 9ba8620
Fix: 개행 적용
GeonH0 ed07510
Fix: RecipeDetailError로 네이밍 변경
GeonH0 cda676a
Fix: RecipeDetailFetchService삭제후 Repository에 Service를 적용
GeonH0 dbf2111
Fix: APIConfig생성후 각 네트워크 서비스에 적용
GeonH0 02a63aa
Merge branch 'main' into feature/FeedDetailDomainData
GeonH0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
HomeCafeRecipes/HomeCafeRecipes/Data/Repositories/RecipeDetailRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// RecipeDetailRepository.swift | ||
// HomeCafeRecipes | ||
// | ||
// Created by 김건호 on 6/26/24. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
protocol RecipeDetailRepository { | ||
func fetchRecipeDetail(recipeID: Int) -> Single<Recipe> | ||
} | ||
|
||
class FeedListRepositoryImpl: RecipeDetailRepository { | ||
private let networkService: RecipeDetailFetchService | ||
|
||
init(networkService: RecipeDetailFetchService) { | ||
self.networkService = networkService | ||
} | ||
|
||
func fetchRecipeDetail(recipeID: Int) -> Single<Recipe> { | ||
return networkService.fetchRecipeDetail(recipeId: recipeID) | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
RecipeDetailFetchService 랑 분리한 이유가 있나요..?
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.
RecipeDetailFetchService는 네트워크 통신만을 담당하고 RecipeDetailRepository는 데이터 접근 로직을 추상화 할수 있습니다.
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.
사실상 서비스에서는 url을 만드는 것 외에 복잡한 통신로직은 없는 것 같은데 이에 비해 레이어가 많은 것 같아요.
어떻게 생각하시나요~?
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.
[cda676a] service를 삭제후 repository에 service가 하는역할을 추가했습니다