mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-07 00:24:18 +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(
|
||||
final String uuid,
|
||||
final DiskSize size,
|
||||
final int gb,
|
||||
) async {
|
||||
bool success = false;
|
||||
|
||||
|
@ -467,7 +467,7 @@ class DigitalOceanApi extends RestApiMap {
|
|||
'/volumes/$uuid/actions',
|
||||
data: {
|
||||
'type': 'resize',
|
||||
'size_gigabytes': size.gibibyte.toInt(),
|
||||
'size_gigabytes': gb,
|
||||
'region': region,
|
||||
},
|
||||
);
|
||||
|
|
|
@ -699,7 +699,7 @@ class DigitalOceanServerProvider extends ServerProvider {
|
|||
) async =>
|
||||
_adapter.api().resizeVolume(
|
||||
volume.uuid!,
|
||||
size,
|
||||
size.gibibyte.toInt(),
|
||||
);
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue