Kaynağa Gözat

Commit 7-8: Sort posts by submitted timestamp.

Frederic G. MARAND 9 yıl önce
ebeveyn
işleme
ce3568ed04
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      client/templates/posts/posts_list.js

+ 1 - 1
client/templates/posts/posts_list.js

@@ -8,7 +8,7 @@
  */
 Template.postsList.helpers({
   posts: function () {
-    return Posts.find();
+    return Posts.find({}, { sort: { submitted: -1 }});
   }
 });