This commit is contained in:
withchao
2023-01-12 16:04:12 +08:00
parent 7b10b17056
commit 69e94c25f4
3 changed files with 9 additions and 10 deletions
+4 -5
View File
@@ -4,7 +4,6 @@ import (
common "Open_IM/internal/api_to_rpc"
api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/token_verify"
rpc "Open_IM/pkg/proto/friend"
"Open_IM/pkg/utils"
"github.com/gin-gonic/gin"
@@ -13,20 +12,20 @@ import (
// 不一致
func AddBlacklist(c *gin.Context) {
common.ApiToRpc(c, &api.AddBlacklistReq{}, &api.AddBlacklistResp{},
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName(), token_verify.ParseUserIDFromToken)
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
}
func ImportFriend1(c *gin.Context) {
common.ApiToRpc(c, &api.ImportFriendReq{}, &api.ImportFriendResp{},
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName(), token_verify.ParseUserIDFromToken)
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
}
func AddFriend1(c *gin.Context) {
common.ApiToRpc(c, &api.AddFriendReq{}, &api.AddFriendResp{},
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName(), token_verify.ParseUserIDFromToken)
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
}
func AddFriendResponse1(c *gin.Context) {
common.ApiToRpc(c, &api.AddFriendResponseReq{}, &api.AddFriendResponseResp{},
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName(), token_verify.ParseUserIDFromToken)
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
}