diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index abc7ecff2..bbb31236c 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.ParamsCommFriend) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 79d37e94e..653730fc0 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -17,7 +17,8 @@ type AddBlacklistResp struct { type ImportFriendReq struct { FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type UserIDResult struct { UserID string `json:"userID""`