Sorting on sending list via socket and RESTApi when projecting

This commit is contained in:
Kasper Rynning-Tønnesen
2018-05-30 11:39:20 +02:00
parent db62d92d1c
commit 65f7f50c18
3 changed files with 7 additions and 33 deletions

View File

@@ -424,7 +424,8 @@ function send_list(coll, socket, send, list_send, configs, shuffled)
},
{
"$project": project_object
}
},
{ "$sort" : { "now_playing" : -1, "votes": -1, "added": 1 } }
], function(err, docs)
//db.collection(coll).find({type: {$ne: "suggested"}}, function(err, docs)
{