Prechádzať zdrojové kódy

Commit 7-8: Sort posts by submitted timestamp.

Frederic G. MARAND 9 rokov pred
rodič
commit
ce3568ed04
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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 }});
   }
 });