Skip to content

Commit

Permalink
Merge pull request #146 from GeneralMagicio/addGitcoinChecksToTOS
Browse files Browse the repository at this point in the history
add gitcoin passport scores check to the acceptedTermsOfService endpoint
  • Loading branch information
ae2079 authored Dec 3, 2024
2 parents 4ec63f8 + 6649385 commit ea17622
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 ea17622

Please sign in to comment.