Browse Source

Commit 7-8: Sort posts by submitted timestamp.

Frederic G. MARAND 9 năm trước cách đây
mục cha
commit
ce3568ed04
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 }});
   }
 });