From ac25916b5f2277203c0b7a1b2db94551b66765d8 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 4 Nov 2026 15:51:23 +0000 Subject: [PATCH] api/v2: register device update operations apart registerDevices passed gocyclo's limit. Updates #3629 --- hscontrol/api/v2/devices.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hscontrol/api/v2/devices.go b/hscontrol/api/v2/devices.go index d57fc9dd7..98d042e0f 100644 --- a/hscontrol/api/v2/devices.go +++ b/hscontrol/api/v2/devices.go @@ -20,7 +20,7 @@ import ( ) func init() { - registrations = append(registrations, registerDevices) + registrations = append(registrations, registerDevices, registerDeviceUpdates) } // Device is the Tailscale device response. Headscale nodes map onto it; fields @@ -503,6 +503,10 @@ func registerDevices(api huma.API, b Backend) { return &deviceRoutesOutput{Body: routesFromView(node)}, nil }) +} + +func registerDeviceUpdates(api huma.API, b Backend) { + deviceTags := []string{"Devices", tagTailscaleCompat} huma.Register(api, requireScope(huma.Operation{ OperationID: "updateDeviceClient",