mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-07 00:24:18 +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);
|
return GenericResult(success: true, data: pricing);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<GenericResult<List<HetznerVolume>>> getVolumes({
|
Future<GenericResult<List<HetznerVolume>>> getVolumes() async {
|
||||||
final String? status,
|
|
||||||
}) async {
|
|
||||||
final List<HetznerVolume> volumes = [];
|
final List<HetznerVolume> volumes = [];
|
||||||
|
|
||||||
Response? getVolumesResonse;
|
Response? getVolumesResonse;
|
||||||
final Dio client = await getClient();
|
final Dio client = await getClient();
|
||||||
try {
|
try {
|
||||||
getVolumesResonse = await client.get(
|
getVolumesResonse = await client.get('/volumes');
|
||||||
'/volumes',
|
|
||||||
queryParameters: {
|
|
||||||
'status': status,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
for (final volume in getVolumesResonse.data['volumes']) {
|
for (final volume in getVolumesResonse.data['volumes']) {
|
||||||
volumes.add(HetznerVolume.fromJson(volume));
|
volumes.add(HetznerVolume.fromJson(volume));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue