diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 0a83053d1..5b138b7c3 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -39,7 +39,7 @@ func main() { friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) - friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) + friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_comment", friend.SetFriendComment) friendRouterGroup.POST("/is_friend", friend.IsFriend) friendRouterGroup.POST("/import_friend", friend.ImportFriend) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 0fa12600f..c31891c32 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -352,7 +352,7 @@ func GetFriendList(c *gin.Context) { return } req := &rpc.GetFriendListReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.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 2522288a8..e452eafda 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -103,7 +103,8 @@ type GetFriendsInfoResp struct { } type GetFriendListReq struct { - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type GetFriendListResp struct { CommResp