diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index bbb31236c..abc7ecff2 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -54,7 +54,7 @@ func ImportFriend(c *gin.Context) { return } req := &rpc.ImportFriendReq{} - utils.CopyStructFields(req, ¶ms) + utils.CopyStructFields(req, ¶ms.ParamsCommFriend) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 018e88b9b..bfcb46467 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -157,7 +157,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq } 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 args ", req.String()) resp := pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{}} var c pbFriend.CommonResp diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 653730fc0..79d37e94e 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -17,8 +17,7 @@ type AddBlacklistResp struct { type ImportFriendReq struct { FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` + ParamsCommFriend } type UserIDResult struct { UserID string `json:"userID""`