From 07d152ae6d357384ca1d81f27cb47daf5739e63b Mon Sep 17 00:00:00 2001 From: simeng-li Date: Mon, 15 Jul 2024 14:53:23 +0800 Subject: [PATCH] fix(core): fix sso query method fix sso query method --- .../experience/classes/validators/profile-validator.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/src/routes/experience/classes/validators/profile-validator.ts b/packages/core/src/routes/experience/classes/validators/profile-validator.ts index c8685aebfbb..a2c8bcb1ce0 100644 --- a/packages/core/src/routes/experience/classes/validators/profile-validator.ts +++ b/packages/core/src/routes/experience/classes/validators/profile-validator.ts @@ -15,7 +15,7 @@ export class ProfileValidator { public async guardProfileUniquenessAcrossUsers(profile: InteractionProfile) { const { hasUser, hasUserWithEmail, hasUserWithPhone, hasUserWithIdentity } = this.queries.users; - const { findUserSsoIdentityBySsoIdentityId } = this.queries.userSsoIdentities; + const { userSsoIdentities } = this.queries; const { username, primaryEmail, primaryPhone, socialIdentity, enterpriseSsoIdentity } = profile; @@ -66,7 +66,10 @@ export class ProfileValidator { if (enterpriseSsoIdentity) { const { issuer, identityId } = enterpriseSsoIdentity; - const userSsoIdentity = await findUserSsoIdentityBySsoIdentityId(issuer, identityId); + const userSsoIdentity = await userSsoIdentities.findUserSsoIdentityBySsoIdentityId( + issuer, + identityId + ); assertThat( !userSsoIdentity,