From 9f851f716d5405662c9c64d3a3e279c2f7b056e9 Mon Sep 17 00:00:00 2001 From: Enache Adelina Date: Mon, 17 Jun 2024 23:58:06 +0300 Subject: [PATCH] fix(github): use variable that actually holds the id --- src/auth/service/auth.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/auth/service/auth.service.ts b/src/auth/service/auth.service.ts index b06effa..54f083d 100644 --- a/src/auth/service/auth.service.ts +++ b/src/auth/service/auth.service.ts @@ -176,7 +176,7 @@ export class AuthService { const { email, name, login, avatar_url } = req.user._json; const socialAccount = await this.prisma.socialAccount.findFirst({ where: { - socialId: req.user.socialId, + socialId: req.user.id, platform: SocialAccountType.GITHUB, }, include: { @@ -384,7 +384,6 @@ export class AuthService { userId: string, req: any, ) { - const socialAcc = await this.prisma.socialAccount.findMany({ where: { socialId: req.user.id, platform }, });