fix add friend

This commit is contained in:
wangchuxiao
2023-03-16 20:21:10 +08:00
parent 0ffce32f62
commit ba6dddf986
7 changed files with 27 additions and 18 deletions
+1 -1
View File
@@ -2,6 +2,7 @@ package api
import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
@@ -28,7 +29,6 @@ func (o *Conversation) client() (conversation.ConversationClient, error) {
}
func (o *Conversation) GetAllConversations(c *gin.Context) {
return
a2r.Call(conversation.ConversationClient.GetAllConversations, o.client, c)
}
+5 -4
View File
@@ -2,6 +2,7 @@ package api
import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
@@ -32,6 +33,10 @@ func (o *Friend) ApplyToAddFriend(c *gin.Context) {
a2r.Call(friend.FriendClient.ApplyToAddFriend, o.client, c)
}
func (o *Friend) RespondFriendApply(c *gin.Context) {
a2r.Call(friend.FriendClient.RespondFriendApply, o.client, c)
}
func (o *Friend) DeleteFriend(c *gin.Context) {
a2r.Call(friend.FriendClient.DeleteFriend, o.client, c)
}
@@ -48,10 +53,6 @@ func (o *Friend) GetFriendList(c *gin.Context) {
a2r.Call(friend.FriendClient.GetDesignatedFriends, o.client, c)
}
func (o *Friend) RespondFriendApply(c *gin.Context) {
a2r.Call(friend.FriendClient.RespondFriendApply, o.client, c)
}
func (o *Friend) SetFriendRemark(c *gin.Context) {
a2r.Call(friend.FriendClient.SetFriendRemark, o.client, c)
}
+1
View File
@@ -2,6 +2,7 @@ package api
import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
+1 -1
View File
@@ -46,11 +46,11 @@ func NewGinRouter(zk discoveryregistry.SvcDiscoveryRegistry, rdb redis.Universal
{
f := NewFriend(zk)
friendRouterGroup.Use(mw.GinParseToken(rdb))
friendRouterGroup.POST("/add_friend", f.ApplyToAddFriend) //1
friendRouterGroup.POST("/delete_friend", f.DeleteFriend) //1
friendRouterGroup.POST("/get_friend_apply_list", f.GetFriendApplyList) //1
friendRouterGroup.POST("/get_self_friend_apply_list", f.GetSelfApplyList) //1
friendRouterGroup.POST("/get_friend_list", f.GetFriendList) //1
friendRouterGroup.POST("/add_friend", f.ApplyToAddFriend) //1
friendRouterGroup.POST("/add_friend_response", f.RespondFriendApply) //1
friendRouterGroup.POST("/set_friend_remark", f.SetFriendRemark) //1
friendRouterGroup.POST("/add_black", f.AddBlack) //1