mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 11:06:43 +08:00
Refactor code
This commit is contained in:
parent
8cd38693dd
commit
cf59f57ab8
@ -69,7 +69,7 @@ func ImportFriend(c *gin.Context) {
|
|||||||
RpcResp, err := client.ImportFriend(context.Background(), req)
|
RpcResp, err := client.ImportFriend(context.Background(), req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String())
|
log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String())
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed "})
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "ImportFriend failed "})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}}
|
resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}}
|
||||||
|
@ -156,10 +156,9 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq
|
|||||||
return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil
|
return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo
|
|
||||||
func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) {
|
func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) {
|
||||||
log.NewInfo(req.OperationID, "ImportFriend failed ", req.String())
|
log.NewInfo(req.OperationID, "ImportFriend failed ", req.String())
|
||||||
var resp pbFriend.ImportFriendResp
|
resp := pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{}}
|
||||||
var c pbFriend.CommonResp
|
var c pbFriend.CommonResp
|
||||||
|
|
||||||
if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) {
|
if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user