From cc5125d51dbb0ed7e9bf19234d8947d8537c2140 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:28:24 +0800 Subject: [PATCH] Refactor code --- cmd/open_im_api/main.go | 4 ++-- pkg/base_info/group_api_struct.go | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index ea550d174..510d8cf55 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -53,8 +53,8 @@ func main() { groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) - groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) - groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) + groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 + groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index e502ee10d..af109afdb 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -108,20 +108,20 @@ type GetGroupInfoResp struct { } type ApplicationGroupResponseReq struct { - OperationID string `json:"groupIDList" binding:"required"` - GroupID string `json:"groupIDList" binding:"required"` - FromUserID string `json:"groupIDList" binding:"required"` - HandledMsg string `json:"groupIDList" binding:"required"` - HandleResult int32 `json:"groupIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` + HandledMsg string `json:"handledMsg"` + HandleResult int32 `json:"handleResult" binding:"required"` } type ApplicationGroupResponseResp struct { CommResp } type JoinGroupReq struct { - GroupID string `json:"groupID"` + GroupID string `json:"groupID" binding:"required"` ReqMessage string `json:"reqMessage"` - OperationID string `json:"operationID"` + OperationID string `json:"operationID" binding:"required"` } type JoinGroupResp struct { CommResp