From b4e7e859fb6777095c9b23fab0481c99ad857289 Mon Sep 17 00:00:00 2001 From: b1ackd0t <28790446+rodneyosodo@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:43:48 +0300 Subject: [PATCH] feat(api): Add JSON tags to connectChannelThingRequest struct (#1930) The connectChannelThingRequest struct in the things/api/http/requests.go file has been updated to include JSON tags for the ThingID and ChannelID fields. This change allows for proper serialization and deserialization of the struct when working with JSON data. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> --- things/api/http/requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/things/api/http/requests.go b/things/api/http/requests.go index 0546bf8e..5ce30759 100644 --- a/things/api/http/requests.go +++ b/things/api/http/requests.go @@ -366,8 +366,8 @@ func (req unassignUserGroupsRequest) validate() error { type connectChannelThingRequest struct { token string - ThingID string - ChannelID string + ThingID string `json:"thing_id,omitempty"` + ChannelID string `json:"channel_id,omitempty"` } func (req *connectChannelThingRequest) validate() error {