File tree Expand file tree Collapse file tree
data/src/main/java/com/example/data/features/product Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com.example.data.features.product.dataSourceContract
22
33import com.example.domain.common.ResultWrapper
4- import com.example.domain.features.product .model.Product
4+ import com.example.domain.features.products .model.Product
55import kotlinx.coroutines.flow.Flow
66
77interface ProductDataSource {
8- suspend fun getProducts (categoryId : String? = null) : Flow <ResultWrapper <List <Product > >>
8+ suspend fun getProducts () : Flow <ResultWrapper <List <Product ?> ? >>
99}
Original file line number Diff line number Diff line change @@ -2,17 +2,18 @@ package com.example.data.features.product.dataSourceImpl
22
33import com.example.data.api.WebServices
44import com.example.data.features.product.dataSourceContract.ProductDataSource
5+ import com.example.data.model.BaseResponse
56import com.example.data.safeAPiCall
67import com.example.domain.common.ResultWrapper
7- import com.example.domain.features.product .model.Product
8+ import com.example.domain.features.products .model.Product
89import kotlinx.coroutines.flow.Flow
910import javax.inject.Inject
1011
1112class ProductDataSourceImpl @Inject constructor(
12- private val webServices : WebServices
13+ private val webServices : WebServices
1314) : ProductDataSource {
14- override suspend fun getProducts (categoryId : String? ): Flow <ResultWrapper <List <Product > >> {
15- return safeAPiCall { webServices.getProductsList(categoryId ) }
15+ override suspend fun getProducts (): Flow <ResultWrapper <List <Product ?> ? >> {
16+ return safeAPiCall { webServices.getProducts( ) }
1617 }
1718
1819}
You can’t perform that action at this time.
0 commit comments