getDataSourceRestrict method
Implementation
Future<Map<String, dynamic>> getDataSourceRestrict({String? folderPath}) async {
try {
final url = Uri.parse('$appHaiva/v1/dataSourceRestrictUsage');
final response = await http.get(url, headers: {
'content-type': 'application/json',
'Authorization': '$token',
});
if (response.statusCode == 200) {
final Map<String, dynamic> files = json.decode(response.body);
print(files);
return files;
} else {
throw Exception('Failed to retrieve data. Error: ${response.statusCode}');
}
} catch (e) {
print('Error: $e');
return {};
}
}