From 21e7c19fca315cc8a97da01a29a4f7a15ea02df4 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 20 Aug 2024 19:57:01 +0800 Subject: [PATCH] :bug: Fix realms member get issue --- pkg/internal/services/realms.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/internal/services/realms.go b/pkg/internal/services/realms.go index a9697b6..5ef6d25 100644 --- a/pkg/internal/services/realms.go +++ b/pkg/internal/services/realms.go @@ -45,16 +45,12 @@ func GetRealmWithAlias(alias string) (models.Realm, error) { } func GetRealmMember(realmId uint, userId uint) (*proto.RealmMemberInfo, error) { - var realm models.Realm - if err := database.C.Where("id = ?", realmId).First(&realm).Error; err != nil { - return nil, err - } pc, err := gap.H.GetServiceGrpcConn(hyper.ServiceTypeAuthProvider) if err != nil { return nil, err } response, err := proto.NewRealmClient(pc).GetRealmMember(context.Background(), &proto.RealmMemberLookupRequest{ - RealmId: uint64(realm.ExternalID), + RealmId: uint64(realmId), UserId: lo.ToPtr(uint64(userId)), }) if err != nil {