From ca48cf835891d74b75229acaa9249987eb1108c2 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 12 Dec 2022 22:20:44 +0800 Subject: [PATCH] add isFriends rpc api --- internal/business/api/business_ext.go | 4 ++-- pkg/urlwhitelist/urlwhitelist.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/business/api/business_ext.go b/internal/business/api/business_ext.go index 9ae460a..cbe33e8 100644 --- a/internal/business/api/business_ext.go +++ b/internal/business/api/business_ext.go @@ -40,9 +40,9 @@ func (s *BusinessExtServer) IsFriends(ctx context.Context, req *pb.IsFriendsReq) if err != nil { return nil, err } - var isFriend = int64(0) + var isFriend = int64(1) if friend == nil { - isFriend = 0 + isFriend = 2 } return &pb.IsFriendsResp{ diff --git a/pkg/urlwhitelist/urlwhitelist.go b/pkg/urlwhitelist/urlwhitelist.go index 6be0a80..2aab7c4 100644 --- a/pkg/urlwhitelist/urlwhitelist.go +++ b/pkg/urlwhitelist/urlwhitelist.go @@ -4,6 +4,7 @@ var Business = map[string]int{ "/pb.BusinessExt/SignIn": 0, "/pb.BusinessExt/EmoticonList": 1, "/pb.BusinessExt/GetUser": 2, + "/pb.BusinessExt/IsFriends": 3, } var Logic = map[string]int{