Added download
This commit is contained in:
@@ -5,6 +5,8 @@ abstract interface class CustomerController {
|
||||
Future<List<CustomerListDto>> getAll(String query, String startsWith);
|
||||
|
||||
Future<CustomerDto?> get({required int id});
|
||||
|
||||
Future<List<int>> export({required int customerId, int? pictureId});
|
||||
}
|
||||
|
||||
class CustomerControllerImpl extends BaseController implements CustomerController {
|
||||
@@ -28,4 +30,13 @@ class CustomerControllerImpl extends BaseController implements CustomerControlle
|
||||
String uriStr = '${uriUtils.getBaseUrl()}$path/$id';
|
||||
return runGetWithAuth(uriStr, (json) => CustomerDto.fromJson(json));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<int>> export({required int customerId, int? pictureId}) {
|
||||
String uriStr = '${uriUtils.getBaseUrl()}$path/export/$customerId';
|
||||
if (pictureId != null) {
|
||||
uriStr += '?picture=$pictureId';
|
||||
}
|
||||
return runGetBytesWithAuth(uriStr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user