Skip to content

Commit

Permalink
25.06.2024 Исправил ошибку с неверным показом закрытых компаний.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakogri authored and grishick committed Jul 4, 2024
1 parent 0a57769 commit b81944b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/serverLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@ class ServerLib {
async handleLoadFinishedCampaigns(req, res, Sentry, DB) {
try{
let pipeline = [
{$match: {$or:[{deleted:{ $exists : false}}, {deleted:false}], complete:true}},
{$match: {$or:[{deleted:{ $exists : false}}, {deleted:false}], successful:true, active:false}},
{$sort: {donate_count: -1, raisedOnCoinbase: -1, _id: 1}},
{$skip : req.body.startRec},
{ $limit:req.body.compaignsCount}
];
let pipeline1 = [
{ $match: {$or:[{deleted:{ $exists : false}}, {deleted:false}], complete:true}}
{ $match: {$or:[{deleted:{ $exists : false}}, {deleted:false}], successful:true, active:false}}
];
let curArr = await DB.collection('campaigns').aggregate(pipeline).toArray();
let curArr1 = await DB.collection('campaigns').aggregate(pipeline1).toArray();
Expand Down

0 comments on commit b81944b

Please sign in to comment.