Skip to content

Commit

Permalink
add gitcoin passport scores check to the acceptedTermsOfService endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ae2079 committed Dec 2, 2024
1 parent 4ec63f8 commit 6649385
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/resolvers/userResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6649385

Please sign in to comment.