]> git.proxmox.com Git - flutter/proxmox_dart_api_client.git/commitdiff
client: correctly set parameter for node actions
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 15 Apr 2024 10:30:20 +0000 (12:30 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 Apr 2024 14:32:00 +0000 (16:32 +0200)
using '?' in the url will be escaped and not used for the get
parameters. Instead add the command to the parameters map.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
lib/src/client.dart

index 447335e854e658963e35129c237d8700ef9b726b..f597c2874e8527c450d4ea676e7ab7d6fe2b68f8 100644 (file)
@@ -366,7 +366,9 @@ class ProxmoxApiClient extends http.BaseClient {
             '/api2/json/nodes/$targetNode/$type/$guestId/status/${action.name}';
         break;
       case 'node':
-        url = '/api2/json/nodes/$targetNode/status/?command=${action.name}';
+        parameters ??= {};
+        parameters["command"] = action.name;
+        url = '/api2/json/nodes/$targetNode/status';
         break;
       default:
         throw ArgumentError.value(