diff options
author | Dessalines <happydooby@gmail.com> | 2019-03-27 11:37:16 -0700 |
---|---|---|
committer | Dessalines <happydooby@gmail.com> | 2019-03-27 11:37:16 -0700 |
commit | fa3791e5022e3603089c93d1e68b15deec8f0c9e (patch) | |
tree | 7c2ce86c2b7d3c57ec2f73dae938de346e3b9aa0 /server | |
parent | d8d3ff6c95e38b945361181824a2946cacac76b2 (diff) |
Adding correct comment ordering
Diffstat (limited to 'server')
-rw-r--r-- | server/src/actions/comment.rs | 1 |
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) } } |