From: eiknat Date: Wed, 21 Oct 2020 01:37:37 +0000 (-0400) Subject: db: fix a few comments i missed X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/README.md?a=commitdiff_plain;h=e8e089034107c51c200e61bdf45796e5c22f2d6d;p=lemmy.git db: fix a few comments i missed --- 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)