mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 01:21:14 +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 {
|
class HetznerVolume {
|
||||||
HetznerVolume(
|
HetznerVolume(
|
||||||
this.id,
|
this.id,
|
||||||
this.sizeByte,
|
this.size,
|
||||||
this.serverId,
|
this.serverId,
|
||||||
this.name,
|
this.name,
|
||||||
this.linuxDevice,
|
this.linuxDevice,
|
||||||
);
|
);
|
||||||
final int id;
|
final int id;
|
||||||
final int sizeByte;
|
final int size;
|
||||||
final int? serverId;
|
final int? serverId;
|
||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ Map<String, dynamic> _$HetznerLocationToJson(HetznerLocation instance) =>
|
||||||
HetznerVolume _$HetznerVolumeFromJson(Map<String, dynamic> json) =>
|
HetznerVolume _$HetznerVolumeFromJson(Map<String, dynamic> json) =>
|
||||||
HetznerVolume(
|
HetznerVolume(
|
||||||
json['id'] as int,
|
json['id'] as int,
|
||||||
json['sizeByte'] as int,
|
json['size'] as int,
|
||||||
json['serverId'] as int?,
|
json['serverId'] as int?,
|
||||||
json['name'] as String,
|
json['name'] as String,
|
||||||
json['linux_device'] as String?,
|
json['linux_device'] as String?,
|
||||||
|
@ -140,7 +140,7 @@ HetznerVolume _$HetznerVolumeFromJson(Map<String, dynamic> json) =>
|
||||||
Map<String, dynamic> _$HetznerVolumeToJson(HetznerVolume instance) =>
|
Map<String, dynamic> _$HetznerVolumeToJson(HetznerVolume instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'sizeByte': instance.sizeByte,
|
'size': instance.size,
|
||||||
'serverId': instance.serverId,
|
'serverId': instance.serverId,
|
||||||
'name': instance.name,
|
'name': instance.name,
|
||||||
'linux_device': instance.linuxDevice,
|
'linux_device': instance.linuxDevice,
|
||||||
|
|
|
@ -532,7 +532,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
volume: ServerVolume(
|
volume: ServerVolume(
|
||||||
id: volume.id,
|
id: volume.id,
|
||||||
name: volume.name,
|
name: volume.name,
|
||||||
sizeByte: volume.sizeByte * 1024 * 1024 * 1024,
|
sizeByte: volume.size * 1024 * 1024 * 1024,
|
||||||
serverId: volume.serverId,
|
serverId: volume.serverId,
|
||||||
linuxDevice: volume.linuxDevice,
|
linuxDevice: volume.linuxDevice,
|
||||||
),
|
),
|
||||||
|
@ -676,7 +676,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
volume = ServerVolume(
|
volume = ServerVolume(
|
||||||
id: result.data!.id,
|
id: result.data!.id,
|
||||||
name: result.data!.name,
|
name: result.data!.name,
|
||||||
sizeByte: result.data!.sizeByte * 1024 * 1024 * 1024,
|
sizeByte: result.data!.size * 1024 * 1024 * 1024,
|
||||||
serverId: result.data!.serverId,
|
serverId: result.data!.serverId,
|
||||||
linuxDevice: result.data!.linuxDevice,
|
linuxDevice: result.data!.linuxDevice,
|
||||||
);
|
);
|
||||||
|
@ -717,7 +717,7 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
try {
|
try {
|
||||||
for (final rawVolume in result.data) {
|
for (final rawVolume in result.data) {
|
||||||
final int volumeId = rawVolume.id;
|
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 volumeServer = rawVolume.serverId;
|
||||||
final String volumeName = rawVolume.name;
|
final String volumeName = rawVolume.name;
|
||||||
final volumeDevice = rawVolume.linuxDevice;
|
final volumeDevice = rawVolume.linuxDevice;
|
||||||
|
|
Loading…
Reference in a new issue