Update: User.ad add isVisible=true & isActive=true
This commit is contained in:
parent
d94a22e87f
commit
fc4abb2546
1 changed files with 2 additions and 2 deletions
|
|
@ -412,10 +412,10 @@ exports.ad = (req, res) => {
|
|||
}
|
||||
let match, pick;
|
||||
if(interests.length > 0){
|
||||
match = {$match: {interests: {$in: interests}}};
|
||||
match = {$match: {isVisible: true, isActive: true, interests: {$in: interests}}};
|
||||
pick = {$limit: parseInt(quantity, 10)}
|
||||
} else {
|
||||
match = {$match: {}};
|
||||
match = {$match: {isVisible: true, isActive: true}};
|
||||
pick = {$sample: {size: parseInt(quantity, 10)}};
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue