Skip to content

Commit

Permalink
add date to qf round donation existance condition
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 committed Nov 7, 2024
1 parent d2b614d commit f2791ef
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/repositories/donationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,14 @@ export async function isVerifiedDonationExistsInQfRound(params: {
`
SELECT EXISTS (
SELECT 1
FROM donation
FROM donation as d
INNER JOIN "qf_round" as qr on qr.id = $1
WHERE
status = 'verified' AND
"qfRoundId" = $1 AND
"projectId" = $2 AND
"userId" = $3
d.status = 'verified' AND
d."qfRoundId" = $1 AND
d."projectId" = $2 AND
d."userId" = $3 AND
d."createdAt" >= qr."beginDate" AND d."createdAt" <= qr."endDate"
) AS exists;
`,
[params.qfRoundId, params.projectId, params.userId],
Expand Down

0 comments on commit f2791ef

Please sign in to comment.