From 9ae71f6a03e9064f09c201dae3c5ba50d23e3a62 Mon Sep 17 00:00:00 2001 From: clauspeterhuebner Date: Fri, 11 Jul 2025 18:20:48 +0200 Subject: [PATCH] switch back from findByOne to findOneByOrFail --- .../src/graphql/api/1_0/resolver/AuthenticationResolver.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts index d67a74d6e..fdbef5fe0 100644 --- a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts +++ b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts @@ -43,9 +43,9 @@ export class AuthenticationResolver { logger.removeContext('handshakeID') throw new Error(errmsg) } - const fedComA = await DbFedCommunity.findOneBy({ publicKey: Buffer.from(args.publicKey, 'hex') }) - logger.debug('fedComA', new FederatedCommunityLoggingView(fedComA!)) - if (fedComA && !openConnectionJwtPayload.url.startsWith(fedComA.endPoint)) { + const fedComA = await DbFedCommunity.findOneByOrFail({ publicKey: Buffer.from(args.publicKey, 'hex') }) + logger.debug('fedComA', new FederatedCommunityLoggingView(fedComA)) + if (!openConnectionJwtPayload.url.startsWith(fedComA.endPoint)) { const errmsg = `invalid url of community with publicKey` + args.publicKey logger.error(errmsg) logger.removeContext('handshakeID')