mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-05 07:34:23 +00:00
fix(hetzner): Remove optional status enum for getVolumes of Hetzner
This commit is contained in:
parent
54dee9c291
commit
f7afd6fd15
|
@ -360,20 +360,13 @@ class HetznerApi extends RestApiMap {
|
|||
return GenericResult(success: true, data: pricing);
|
||||
}
|
||||
|
||||
Future<GenericResult<List<HetznerVolume>>> getVolumes({
|
||||
final String? status,
|
||||
}) async {
|
||||
Future<GenericResult<List<HetznerVolume>>> getVolumes() async {
|
||||
final List<HetznerVolume> volumes = [];
|
||||
|
||||
Response? getVolumesResonse;
|
||||
final Dio client = await getClient();
|
||||
try {
|
||||
getVolumesResonse = await client.get(
|
||||
'/volumes',
|
||||
queryParameters: {
|
||||
'status': status,
|
||||
},
|
||||
);
|
||||
getVolumesResonse = await client.get('/volumes');
|
||||
for (final volume in getVolumesResonse.data['volumes']) {
|
||||
volumes.add(HetznerVolume.fromJson(volume));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue