diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-24 16:09:37 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-24 16:09:37 +0200 |
commit | e2c8e168a53c892ba05614898368ac8f71d1fcbd (patch) | |
tree | 59dc960777c15d8ee6e1d143fbf63cae343a6627 | |
parent | Posts were sorten on when added time was. This was only accurate to the minut... (diff) | |
download | Divid-e2c8e168a53c892ba05614898368ac8f71d1fcbd.tar.gz |
don't get so many fields.. faster loading
-rw-r--r-- | models/pPost.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/pPost.js b/models/pPost.js index d36eb36..ad17890 100644 --- a/models/pPost.js +++ b/models/pPost.js @@ -36,7 +36,7 @@ pPostSchema.statics = { load: function(id, callback) { this.findOne({ _id: id }) - .populate('user') + .populate({ path: 'user', select: '_id, name'}) .exec(callback); }, |