From 31debf70558ad3487f669446a2969abb0057ae4c Mon Sep 17 00:00:00 2001 From: Adrien Raffin-Caboisse Date: Mon, 25 Apr 2022 20:45:07 +0200 Subject: [PATCH] feat: rewrite proto to only update tags of machine --- proto/headscale/v1/headscale.proto | 4 ++-- proto/headscale/v1/machine.proto | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/proto/headscale/v1/headscale.proto b/proto/headscale/v1/headscale.proto index 207b4dd..af3bd8b 100644 --- a/proto/headscale/v1/headscale.proto +++ b/proto/headscale/v1/headscale.proto @@ -81,9 +81,9 @@ service HeadscaleService { }; } - rpc UpdateMachine(UpdateMachineRequest) returns (UpdateMachineResponse) { + rpc SetTags(SetTagsRequest) returns (SetTagsResponse) { option (google.api.http) = { - post: "/api/v1/machine/{machine.id}" + post: "/api/v1/machine/{machine_id}/tags" body: "*" }; } diff --git a/proto/headscale/v1/machine.proto b/proto/headscale/v1/machine.proto index 8656411..0e5d75a 100644 --- a/proto/headscale/v1/machine.proto +++ b/proto/headscale/v1/machine.proto @@ -62,11 +62,12 @@ message GetMachineResponse { Machine machine = 1; } -message UpdateMachineRequest { - Machine machine = 1; +message SetTagsRequest { + uint64 machine_id = 1; + repeated string tags = 2; } -message UpdateMachineResponse { +message SetTagsResponse { Machine machine = 1; }