Refactor code

pull/131/head
wenxu12345 3 years ago
parent a0f28c07f2
commit 93e669d7d3

@ -59,7 +59,7 @@ func main() {
groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList)
groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember)
groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo)
groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup)
groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1
groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList)
}
//certificate

@ -120,9 +120,12 @@ func GetGroupMemberList(c *gin.Context) {
return
}
memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList, NextSeq: RpcResp.NextSeq}
c.JSON(http.StatusOK, memberListResp)
memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList, NextSeq: RpcResp.NextSeq}
if len(memberListResp.MemberList) == 0 {
memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{}
}
log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp)
c.JSON(http.StatusOK, memberListResp)
}
func GetGroupAllMember(c *gin.Context) {

@ -59,8 +59,8 @@ type GetGroupMemberListReq struct {
}
type GetGroupMemberListResp struct {
CommResp
NextSeq int32 `json:"nextSeq"`
Data []*open_im_sdk.GroupMemberFullInfo `json:"data"`
NextSeq int32 `json:"nextSeq"`
MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"`
}
type GetGroupAllMemberReq struct {

Loading…
Cancel
Save