From a1ab7f7c94b4ab2d38ddd337ff17e9c207423f51 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 17 Jun 2024 16:27:09 +0200 Subject: [PATCH] client/tailscale: add NodeID to device Updates tailscale/corp#20514 Signed-off-by: Kristoffer Dalby --- client/tailscale/devices.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/tailscale/devices.go b/client/tailscale/devices.go index 108a70aff..9008d4d0d 100644 --- a/client/tailscale/devices.go +++ b/client/tailscale/devices.go @@ -10,6 +10,7 @@ "context" "encoding/json" "fmt" + "log" "net/http" "net/url" @@ -39,6 +40,7 @@ type Device struct { // It's currently just 1 element, the 100.x.y.z Tailscale IP. Addresses []string `json:"addresses"` DeviceID string `json:"id"` + NodeID string `json:"nodeId"` User string `json:"user"` Name string `json:"name"` Hostname string `json:"hostname"` @@ -213,6 +215,9 @@ func (c *Client) DeleteDevice(ctx context.Context, deviceID string) (err error) if err != nil { return err } + + log.Printf("RESP: %di, path: %s", resp.StatusCode, path) + // If status code was not successful, return the error. // TODO: Change the check for the StatusCode to include other 2XX success codes. if resp.StatusCode != http.StatusOK {