From e8e089034107c51c200e61bdf45796e5c22f2d6d Mon Sep 17 00:00:00 2001 From: eiknat Date: Tue, 20 Oct 2020 21:37:37 -0400 Subject: [PATCH] db: fix a few comments i missed --- lemmy_db/src/comment_report.rs | 4 ++-- lemmy_db/src/post_report.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lemmy_db/src/comment_report.rs b/lemmy_db/src/comment_report.rs index 0725256c..2002f66e 100644 --- a/lemmy_db/src/comment_report.rs +++ b/lemmy_db/src/comment_report.rs @@ -110,7 +110,7 @@ impl CommentReportView { pub fn read(conn: &PgConnection, report_id: i32) -> Result { use super::comment_report::comment_report_view::dsl::*; comment_report_view - .filter(id.eq(report_id)) + .find(report_id) .first::(conn) } } @@ -167,7 +167,7 @@ impl<'a> CommentReportQueryBuilder<'a> { let (limit, offset) = limit_and_offset(self.page, self.limit); query - .order_by(published.desc()) + .order_by(published.asc()) .limit(limit) .offset(offset) .load::(self.conn) diff --git a/lemmy_db/src/post_report.rs b/lemmy_db/src/post_report.rs index d461797c..3a2fc156 100644 --- a/lemmy_db/src/post_report.rs +++ b/lemmy_db/src/post_report.rs @@ -107,7 +107,7 @@ impl PostReportView { pub fn read(conn: &PgConnection, report_id: i32) -> Result { use super::post_report::post_report_view::dsl::*; post_report_view - .filter(id.eq(report_id)) + .find(report_id) .first::(conn) } } @@ -173,7 +173,7 @@ impl<'a> PostReportQueryBuilder<'a> { let (limit, offset) = limit_and_offset(self.page, self.limit); query - .order_by(published.desc()) + .order_by(published.asc()) .limit(limit) .offset(offset) .load::(self.conn) -- 2.44.1