mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Refactor code
This commit is contained in:
parent
7903dc7c2e
commit
e75e36e999
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user