From 6649385559f4f6ea856fe2900973672a07af39fb Mon Sep 17 00:00:00 2001 From: ali Date: Mon, 2 Dec 2024 20:04:02 +0330 Subject: [PATCH] add gitcoin passport scores check to the acceptedTermsOfService endpoint --- src/resolvers/userResolver.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/resolvers/userResolver.ts b/src/resolvers/userResolver.ts index c99807951..9ad339cc5 100644 --- a/src/resolvers/userResolver.ts +++ b/src/resolvers/userResolver.ts @@ -448,7 +448,12 @@ export class UserResolver { const userFromDB = await findUserById(user.userId); - if (userFromDB?.privadoVerified && !userFromDB.acceptedToS) { + if ( + (userFromDB?.hasEnoughGitcoinAnalysisScore || + userFromDB?.hasEnoughGitcoinPassportScore || + userFromDB?.privadoVerified) && + !userFromDB.acceptedToS + ) { userFromDB.acceptedToS = true; userFromDB.acceptedToSDate = new Date(); await userFromDB.save();