Refactor code

pull/131/head
wenxu12345 3 years ago
parent e6f21d166a
commit db37d0197a

@ -403,6 +403,9 @@ func GetFriendApplyList(c *gin.Context) {
} }
resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList}
if len(resp.FriendRequestList) == 0 {
resp.FriendRequestList = []*open_im_sdk.FriendRequest{}
}
log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp)
c.JSON(http.StatusOK, resp) c.JSON(http.StatusOK, resp)
} }

Loading…
Cancel
Save