refactor: Conventionally reduce DiskSize to only 'int gb' for resize digital ocean volume

pull/368/head
NaiJi ✨ 2023-09-30 21:35:58 -03:00
parent fbacb5969d
commit 043d29538c
2 changed files with 3 additions and 3 deletions

View File

@ -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,
},
);

View File

@ -699,7 +699,7 @@ class DigitalOceanServerProvider extends ServerProvider {
) async =>
_adapter.api().resizeVolume(
volume.uuid!,
size,
size.gibibyte.toInt(),
);
@override