From 62769b6c0d777fb4e02e39495c5b5c44b899b112 Mon Sep 17 00:00:00 2001 From: Rapolas Gruzdys Date: Thu, 5 Oct 2023 17:18:00 +0300 Subject: [PATCH] Add missing inputs for device modification endpoint (#31) --- src/Resources/Devices.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Resources/Devices.php b/src/Resources/Devices.php index f6598be..dca53d4 100644 --- a/src/Resources/Devices.php +++ b/src/Resources/Devices.php @@ -5,6 +5,7 @@ namespace Rapkis\Controld\Resources; use Illuminate\Http\Client\PendingRequest; +use Rapkis\Controld\Enums\DeviceStatus; use Rapkis\Controld\Factories\DeviceFactory; use Rapkis\Controld\Factories\DeviceTypeFactory; use Rapkis\Controld\Responses\Device; @@ -104,6 +105,8 @@ public function modify( string $ddnsSubdomain = null, int $ddnsExternalStatus = null, string $ddnsExternalHost = null, + DeviceStatus $status = null, + string $ctrldCustomConfig = null, ): Device { $response = $this->client->put("devices/{$devicePk}", [ 'name' => $name, @@ -120,6 +123,8 @@ public function modify( 'ddns_subdomain' => $ddnsSubdomain, 'ddns_ext_status' => $ddnsExternalStatus, 'ddns_ext_host' => $ddnsExternalHost, + 'status' => $status?->value, + 'ctrld_custom_config' => $ctrldCustomConfig, ])->json('body'); return $this->device->make($response);