mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 10:22:36 +08:00
Refactor code
This commit is contained in:
parent
db37d0197a
commit
447ccdf042
@ -31,9 +31,9 @@ func main() {
|
|||||||
friendRouterGroup := r.Group("/friend")
|
friendRouterGroup := r.Group("/friend")
|
||||||
{
|
{
|
||||||
// friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo)
|
// friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo)
|
||||||
friendRouterGroup.POST("/add_friend", friend.AddFriend) //1
|
friendRouterGroup.POST("/add_friend", friend.AddFriend) //1
|
||||||
friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList)
|
friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1
|
||||||
friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1
|
friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1
|
||||||
friendRouterGroup.POST("/get_friend_list", friend.GetFriendList)
|
friendRouterGroup.POST("/get_friend_list", friend.GetFriendList)
|
||||||
friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist)
|
friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist)
|
||||||
friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist)
|
friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist)
|
||||||
|
@ -120,6 +120,8 @@ func AddFriendResponse(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}}
|
req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}}
|
||||||
utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend)
|
utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend)
|
||||||
|
req.HandleMsg = params.HandleMsg
|
||||||
|
req.Flag = params.Flag
|
||||||
var ok bool
|
var ok bool
|
||||||
ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"))
|
ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"))
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user