fix
This commit is contained in:
@@ -35,8 +35,13 @@ class ProductsRemoteDataSourceImpl implements ProductsRemoteDataSource {
|
||||
@override
|
||||
Future<List<ProductModel>> getProducts(int warehouseId, String type) async {
|
||||
try {
|
||||
// Make API call to get all products
|
||||
final response = await apiClient.get('/portalProduct/getAllProduct');
|
||||
// Choose endpoint based on operation type
|
||||
final endpoint = type == 'export'
|
||||
? ApiEndpoints.productsForExport(warehouseId)
|
||||
: ApiEndpoints.products;
|
||||
|
||||
// Make API call to get products
|
||||
final response = await apiClient.get(endpoint);
|
||||
|
||||
// Parse the API response using ApiResponse wrapper
|
||||
final apiResponse = ApiResponse.fromJson(
|
||||
|
||||
Reference in New Issue
Block a user