Skip to content

Commit

Permalink
Merge pull request #103 from Team-MindWay/100-RecommendType-BugEdit
Browse files Browse the repository at this point in the history
🔀 :: [#102] Edit Recommend Fetch Type
  • Loading branch information
Xixn2 authored Jul 18, 2024
2 parents 87a947a + bfb2612 commit baa9757
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

public final class RemoteRecommendDataSourceImpl: BaseRemoteDataSource<RecommendAPI>, RemoteRecommendDataSource {
public func fetchRecommend(params: String) async throws -> RecommendBookEntity {
public func fetchRecommend(params: RecommendEnum) async throws -> RecommendBookEntity {
try await request(.fetchRecommendBook(params: params), dto: FetchRecommendBookResponseDTO.self)
.toDomain()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public struct RecommendBookRepositoryImpl: RecommendRepository {
self.remoteRecommendDataSource = remoteRecommendDataSource
}

public func fetchRecommend(params: String) async throws -> RecommendBookEntity {
public func fetchRecommend(params: RecommendEnum) async throws -> RecommendBookEntity {
try await remoteRecommendDataSource.fetchRecommend(params: params)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public struct FetchRecommendUseCaseImpl: FetchRecommendUseCase {
self.recommendRepository = recommendRepository
}

public func execute(params: String) async throws -> RecommendBookEntity {
public func execute(params: RecommendEnum) async throws -> RecommendBookEntity {
try await recommendRepository.fetchRecommend(params: params)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation

public protocol RemoteRecommendDataSource {
func fetchRecommend(params: String) async throws -> RecommendBookEntity
func fetchRecommend(params: RecommendEnum) async throws -> RecommendBookEntity
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation

public protocol RecommendRepository {
func fetchRecommend(params: String) async throws -> RecommendBookEntity
func fetchRecommend(params: RecommendEnum) async throws -> RecommendBookEntity
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public protocol FetchRecommendUseCase {
func execute(params: String) async throws -> RecommendBookEntity
func execute(params: RecommendEnum) async throws -> RecommendBookEntity
}

0 comments on commit baa9757

Please sign in to comment.