mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 11:05:59 +08:00
fix bug
This commit is contained in:
+13
-13
@@ -464,24 +464,24 @@ func GetGroupsInfo(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
resp := api.GetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: transferGroupInfo(RpcResp.GroupInfoList)}
|
||||
resp := api.GetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: RpcResp.GroupInfoList}
|
||||
resp.Data = jsonData.JsonDataList(resp.GroupInfoList)
|
||||
log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
func transferGroupInfo(input []*open_im_sdk.GroupInfo) []*api.GroupInfoAlias {
|
||||
var result []*api.GroupInfoAlias
|
||||
for _, v := range input {
|
||||
t := &api.GroupInfoAlias{}
|
||||
utils.CopyStructFields(t, &v)
|
||||
if v.NeedVerification != nil {
|
||||
t.NeedVerification = v.NeedVerification.Value
|
||||
}
|
||||
result = append(result, t)
|
||||
}
|
||||
return result
|
||||
}
|
||||
//func transferGroupInfo(input []*open_im_sdk.GroupInfo) []*api.GroupInfoAlias {
|
||||
// var result []*api.GroupInfoAlias
|
||||
// for _, v := range input {
|
||||
// t := &api.GroupInfoAlias{}
|
||||
// utils.CopyStructFields(t, &v)
|
||||
// if v.NeedVerification != nil {
|
||||
// t.NeedVerification = v.NeedVerification.Value
|
||||
// }
|
||||
// result = append(result, t)
|
||||
// }
|
||||
// return result
|
||||
//}
|
||||
|
||||
//process application
|
||||
func ApplicationGroupResponse(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user