Open lso033c opened 5 months ago
??
؟
is better to put mapper from DTO to domain in the use case or in the repo class GetPostsUseCase
@Inject
constructor(
private val repository: PostRepository,
private val mapper: PostDataSourceToEntityMapper,
) {
suspend fun invoke(): Flow<List<PostEntity>> = repository.getPosts().map { postListDataSource ->
postListDataSource.map { postDataSource -> mapper.map(input = postDataSource) }
}
}
first, I do think this is one of the best repo on GitHub just having few question plz , just to increase my knowledge , help plz