diff --git a/src/adverts/repository/mongo/filters/map-restrictions.ts b/src/adverts/repository/mongo/filters/map-restrictions.ts index 99af9a7..8f7cfba 100644 --- a/src/adverts/repository/mongo/filters/map-restrictions.ts +++ b/src/adverts/repository/mongo/filters/map-restrictions.ts @@ -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: '' } }, + } )