Skip to content

Commit

Permalink
mondo supports isPicked restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
jlarsson committed Jul 3, 2024
1 parent b156ac2 commit 6770309
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/adverts/repository/mongo/filters/map-restrictions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,10 @@ export const mapRestrictions = (
},
restrictions?.hasReservations === false && { 'meta.reservedCount': 0 },
restrictions?.hasCollects === true && { 'meta.collectedCount': { $gt: 0 } },
restrictions?.hasCollects === false && { 'meta.collectedCount': 0 }
restrictions?.hasCollects === false && { 'meta.collectedCount': 0 },

restrictions?.isPicked === true && { 'advert.pickedAt': { $gt: '' } },
restrictions?.isPicked === false && {
'advert.pickedAt': { $not: { $gt: '' } },
}
)

0 comments on commit 6770309

Please sign in to comment.