mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-02-02 14:16:58 +00:00
fix(hetzner): Fix endpoints urls
Incorrect dereferencing in strings
This commit is contained in:
parent
92b417a103
commit
2a5fceae91
|
@ -234,7 +234,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi {
|
|||
Future<void> deleteVolume(final ServerVolume volume) async {
|
||||
final Dio client = await getClient();
|
||||
try {
|
||||
await client.delete('/volumes/$volume.id');
|
||||
await client.delete('/volumes/${volume.id}');
|
||||
} catch (e) {
|
||||
print(e);
|
||||
} finally {
|
||||
|
@ -253,7 +253,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi {
|
|||
final Dio client = await getClient();
|
||||
try {
|
||||
dbPostResponse = await client.post(
|
||||
'/volumes/$volume.id/actions/attach',
|
||||
'/volumes/${volume.id}/actions/attach',
|
||||
data: {
|
||||
'automount': true,
|
||||
'server': serverId,
|
||||
|
@ -276,7 +276,9 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi {
|
|||
final Response dbPostResponse;
|
||||
final Dio client = await getClient();
|
||||
try {
|
||||
dbPostResponse = await client.post('/volumes/$volume.id/actions/detach');
|
||||
dbPostResponse = await client.post(
|
||||
'/volumes/${volume.id}/actions/detach',
|
||||
);
|
||||
success = dbPostResponse.data['action']['status'].toString() != 'error';
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
@ -298,7 +300,7 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi {
|
|||
final Dio client = await getClient();
|
||||
try {
|
||||
dbPostResponse = await client.post(
|
||||
'/volumes/$volume.id/actions/resize',
|
||||
'/volumes/${volume.id}/actions/resize',
|
||||
data: {
|
||||
'size': size.gibibyte,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue