mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-07 00:24:18 +00:00
refactor: Correct a typo in Hetzner API
This commit is contained in:
parent
f7afd6fd15
commit
cea2f6d8a4
|
@ -363,11 +363,11 @@ class HetznerApi extends RestApiMap {
|
||||||
Future<GenericResult<List<HetznerVolume>>> getVolumes() async {
|
Future<GenericResult<List<HetznerVolume>>> getVolumes() async {
|
||||||
final List<HetznerVolume> volumes = [];
|
final List<HetznerVolume> volumes = [];
|
||||||
|
|
||||||
Response? getVolumesResonse;
|
Response? getVolumesResponse;
|
||||||
final Dio client = await getClient();
|
final Dio client = await getClient();
|
||||||
try {
|
try {
|
||||||
getVolumesResonse = await client.get('/volumes');
|
getVolumesResponse = await client.get('/volumes');
|
||||||
for (final volume in getVolumesResonse.data['volumes']) {
|
for (final volume in getVolumesResponse.data['volumes']) {
|
||||||
volumes.add(HetznerVolume.fromJson(volume));
|
volumes.add(HetznerVolume.fromJson(volume));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -384,8 +384,8 @@ class HetznerApi extends RestApiMap {
|
||||||
return GenericResult(
|
return GenericResult(
|
||||||
data: volumes,
|
data: volumes,
|
||||||
success: true,
|
success: true,
|
||||||
code: getVolumesResonse.statusCode,
|
code: getVolumesResponse.statusCode,
|
||||||
message: getVolumesResonse.statusMessage,
|
message: getVolumesResponse.statusMessage,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue