mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-20 11:39:18 +08:00
Refactor code
This commit is contained in:
parent
d58dc29550
commit
c049cde8cf
@ -372,6 +372,9 @@ 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}
|
||||||
|
if len(resp.FriendInfoList) == 0 {
|
||||||
|
resp.FriendInfoList = []*open_im_sdk.FriendInfo{}
|
||||||
|
}
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user