Skip to content

Commit

Permalink
fix(flagged proposals): fix query builder (#666)
Browse files Browse the repository at this point in the history
* fix(flagged proposals): fix query builder

* Update src/graphql/operations/proposals.ts
  • Loading branch information
Todmy committed Sep 6, 2023
1 parent 4df9dfb commit e0319c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/graphql/operations/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ export default async function (parent, args) {
params.push(`%"name": "${where.validation}"%`);
}

if (where.space_verified) {
if (where.space_verified && verifiedSpaces.length > 0) {
searchSql += ' AND spaces.id in (?)';
params.push(verifiedSpaces);
}

if (where.flagged === true) {
if (where.flagged === true && flaggedProposals.length > 0) {
searchSql += ' AND p.id IN (?)';
params.push(flaggedProposals);
}

if (where.flagged === false) {
if (where.flagged === false && flaggedProposals.length > 0) {
searchSql += ' AND p.id NOT IN (?)';
params.push(flaggedProposals);
}
Expand Down

0 comments on commit e0319c3

Please sign in to comment.