Sorting would not work

I have written a sorting function but it would not work. I have no idea where am i going wrong.The code below is suppose to sort picture on the basis of points

models.Picture.find().sort({points:-1}).all(function (err, pics){
if(err) {
    throw err;
}
pics.forEach(function(pic) {
    pictures.push(pic);
})
});

You should be calling run and not all. all invokes the $all operator which is an array matching operator. As in:

models.Picture.find().sort({points:-1}).run(function (err, pics){