mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
refactor: Conventionally reduce DiskSize to only 'int gb' for resize digital ocean volume
This commit is contained in:
parent
fbacb5969d
commit
043d29538c
|
@ -456,7 +456,7 @@ class DigitalOceanApi extends RestApiMap {
|
||||||
|
|
||||||
Future<GenericResult<bool>> resizeVolume(
|
Future<GenericResult<bool>> resizeVolume(
|
||||||
final String uuid,
|
final String uuid,
|
||||||
final DiskSize size,
|
final int gb,
|
||||||
) async {
|
) async {
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ class DigitalOceanApi extends RestApiMap {
|
||||||
'/volumes/$uuid/actions',
|
'/volumes/$uuid/actions',
|
||||||
data: {
|
data: {
|
||||||
'type': 'resize',
|
'type': 'resize',
|
||||||
'size_gigabytes': size.gibibyte.toInt(),
|
'size_gigabytes': gb,
|
||||||
'region': region,
|
'region': region,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -699,7 +699,7 @@ class DigitalOceanServerProvider extends ServerProvider {
|
||||||
) async =>
|
) async =>
|
||||||
_adapter.api().resizeVolume(
|
_adapter.api().resizeVolume(
|
||||||
volume.uuid!,
|
volume.uuid!,
|
||||||
size,
|
size.gibibyte.toInt(),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
Loading…
Reference in a new issue