summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorDessalines <happydooby@gmail.com>2019-03-27 11:37:16 -0700
committerDessalines <happydooby@gmail.com>2019-03-27 11:37:16 -0700
commitfa3791e5022e3603089c93d1e68b15deec8f0c9e (patch)
tree7c2ce86c2b7d3c57ec2f73dae938de346e3b9aa0 /server
parentd8d3ff6c95e38b945361181824a2946cacac76b2 (diff)
Adding correct comment ordering
Diffstat (limited to 'server')
-rw-r--r--server/src/actions/comment.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/actions/comment.rs b/server/src/actions/comment.rs
index ceedf294..93e808a4 100644
--- a/server/src/actions/comment.rs
+++ b/server/src/actions/comment.rs
@@ -103,6 +103,7 @@ impl Comment {
pub fn from_post(conn: &PgConnection, post: &Post) -> Result<Vec<Self>, Error> {
use schema::community::dsl::*;
Comment::belonging_to(post)
+ .order_by(comment::published.desc())
.load::<Self>(conn)
}
}