Update: User.ad console.log of match and pick

This commit is contained in:
Yûki VACHOT 2021-12-15 01:52:32 +01:00
parent fc4abb2546
commit bec2c5848b

View file

@ -418,8 +418,11 @@ exports.ad = (req, res) => {
match = {$match: {isVisible: true, isActive: true}}; match = {$match: {isVisible: true, isActive: true}};
pick = {$sample: {size: parseInt(quantity, 10)}}; pick = {$sample: {size: parseInt(quantity, 10)}};
} }
console.log(match, pick);
Ad.aggregate([match, pick]) Ad.aggregate([
match,
pick
])
.then(data => { .then(data => {
return sendMessage(res, 11, data, token); return sendMessage(res, 11, data, token);
}) })