Skip to content

Commit

Permalink
Add missing inputs for device modification endpoint (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
rapkis authored Oct 5, 2023
1 parent a3fb5ec commit 62769b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Resources/Devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit 62769b6

Please sign in to comment.