mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-17 14:19:16 +00:00
fix: Change sizeByte field to size for HetznerVolume
This commit is contained in:
parent
9d62d3af8e
commit
55f62f1200
|
@ -141,13 +141,13 @@ class HetznerLocation {
|
|||
class HetznerVolume {
|
||||
HetznerVolume(
|
||||
this.id,
|
||||
this.sizeByte,
|
||||
this.size,
|
||||
this.serverId,
|
||||
this.name,
|
||||
this.linuxDevice,
|
||||
);
|
||||
final int id;
|
||||
final int sizeByte;
|
||||
final int size;
|
||||
final int? serverId;
|
||||
final String name;
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ Map<String, dynamic> _$HetznerLocationToJson(HetznerLocation instance) =>
|
|||
HetznerVolume _$HetznerVolumeFromJson(Map<String, dynamic> json) =>
|
||||
HetznerVolume(
|
||||
json['id'] as int,
|
||||
json['sizeByte'] as int,
|
||||
json['size'] as int,
|
||||
json['serverId'] as int?,
|
||||
json['name'] as String,
|
||||
json['linux_device'] as String?,
|
||||
|
@ -140,7 +140,7 @@ HetznerVolume _$HetznerVolumeFromJson(Map<String, dynamic> json) =>
|
|||
Map<String, dynamic> _$HetznerVolumeToJson(HetznerVolume instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'sizeByte': instance.sizeByte,
|
||||
'size': instance.size,
|
||||
'serverId': instance.serverId,
|
||||
'name': instance.name,
|
||||
'linux_device': instance.linuxDevice,
|
||||
|
|
|
@ -532,7 +532,7 @@ class HetznerServerProvider extends ServerProvider {
|
|||
volume: ServerVolume(
|
||||
id: volume.id,
|
||||
name: volume.name,
|
||||
sizeByte: volume.sizeByte * 1024 * 1024 * 1024,
|
||||
sizeByte: volume.size * 1024 * 1024 * 1024,
|
||||
serverId: volume.serverId,
|
||||
linuxDevice: volume.linuxDevice,
|
||||
),
|
||||
|
@ -676,7 +676,7 @@ class HetznerServerProvider extends ServerProvider {
|
|||
volume = ServerVolume(
|
||||
id: result.data!.id,
|
||||
name: result.data!.name,
|
||||
sizeByte: result.data!.sizeByte * 1024 * 1024 * 1024,
|
||||
sizeByte: result.data!.size * 1024 * 1024 * 1024,
|
||||
serverId: result.data!.serverId,
|
||||
linuxDevice: result.data!.linuxDevice,
|
||||
);
|
||||
|
@ -717,7 +717,7 @@ class HetznerServerProvider extends ServerProvider {
|
|||
try {
|
||||
for (final rawVolume in result.data) {
|
||||
final int volumeId = rawVolume.id;
|
||||
final int volumeSize = rawVolume.sizeByte * 1024 * 1024 * 1024;
|
||||
final int volumeSize = rawVolume.size * 1024 * 1024 * 1024;
|
||||
final volumeServer = rawVolume.serverId;
|
||||
final String volumeName = rawVolume.name;
|
||||
final volumeDevice = rawVolume.linuxDevice;
|
||||
|
|
Loading…
Reference in a new issue