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

View File

@ -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