mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 09:16:54 +00:00
fix(digital-ocean): Fix response code checking on volume actions
We can't compare with 'compelted' because Digital Ocean responses with 'in progress' right away or something, so it's better to check if it's just not 'error'
This commit is contained in:
parent
edc171efd7
commit
aa1c04fdb8
|
@ -241,8 +241,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi {
|
|||
'region': region,
|
||||
},
|
||||
);
|
||||
success =
|
||||
dbPostResponse.data['action']['status'].toString() == 'completed';
|
||||
success = dbPostResponse.data['action']['status'].toString() != 'error';
|
||||
} catch (e) {
|
||||
print(e);
|
||||
} finally {
|
||||
|
@ -268,8 +267,7 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi {
|
|||
'region': region,
|
||||
},
|
||||
);
|
||||
success =
|
||||
dbPostResponse.data['action']['status'].toString() == 'completed';
|
||||
success = dbPostResponse.data['action']['status'].toString() != 'error';
|
||||
} catch (e) {
|
||||
print(e);
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue