mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-04 06:49:21 +08:00
Refactor code
This commit is contained in:
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…
x
Reference in New Issue
Block a user