mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
Refactor code
This commit is contained in:
parent
a677d4da5f
commit
5fef41e132
@ -383,10 +383,11 @@ func GetFriendList(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList}
|
resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList}
|
||||||
resp.FriendInfoList[0].CreateTime = resp.FriendInfoList[0].CreateTime / 100
|
resp.TestTime = 1641450220
|
||||||
resp.Data = jsonData.JsonDataList(resp.FriendInfoList)
|
resp.Data = jsonData.JsonDataList(resp.FriendInfoList)
|
||||||
log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp)
|
log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp)
|
||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
|
//c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetFriendApplyList(c *gin.Context) {
|
func GetFriendApplyList(c *gin.Context) {
|
||||||
|
@ -111,7 +111,8 @@ type GetFriendListReq struct {
|
|||||||
}
|
}
|
||||||
type GetFriendListResp struct {
|
type GetFriendListResp struct {
|
||||||
CommResp
|
CommResp
|
||||||
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
|
TestTime uint32 `json:"test_time"`
|
||||||
|
FriendInfoList []*open_im_sdk.FriendInfo `json:"test_data"`
|
||||||
Data []map[string]interface{} `json:"data"`
|
Data []map[string]interface{} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user