diff --git a/crates/db_views/src/comment_report_view.rs b/crates/db_views/src/comment_report_view.rs index cded46ac9b9cdc92f723b218ee8f5bd074ef8ef6..e1b182cafb532cb3c4b0031f2216d20664451117 100644 --- a/crates/db_views/src/comment_report_view.rs +++ b/crates/db_views/src/comment_report_view.rs @@ -112,7 +112,7 @@ fn queries<'a>() -> Queries< let (limit, offset) = limit_and_offset(options.page, options.limit)?; query = query - .order_by(comment_report::published.desc()) + .order_by(comment_report::published.asc()) .limit(limit) .offset(offset); @@ -476,8 +476,8 @@ mod tests { assert_eq!( reports, [ + expected_sara_report_view.clone(), expected_jessica_report_view.clone(), - expected_sara_report_view.clone() ] ); diff --git a/crates/db_views/src/post_report_view.rs b/crates/db_views/src/post_report_view.rs index 324023ecf5cafd49a49032e04c773146713bb95e..4e0d896ca8fa9654d5a6bbd228a8a3f350284dce 100644 --- a/crates/db_views/src/post_report_view.rs +++ b/crates/db_views/src/post_report_view.rs @@ -90,7 +90,7 @@ fn queries<'a>() -> Queries< let (limit, offset) = limit_and_offset(options.page, options.limit)?; query = query - .order_by(post_report::published.desc()) + .order_by(post_report::published.asc()) .limit(limit) .offset(offset); @@ -337,8 +337,8 @@ mod tests { .await .unwrap(); - assert_eq!(reports[0].creator.id, inserted_jessica.id); - assert_eq!(reports[1].creator.id, inserted_sara.id); + assert_eq!(reports[0].creator.id, inserted_sara.id); + assert_eq!(reports[1].creator.id, inserted_jessica.id); // Make sure the counts are correct let report_count = PostReportView::get_report_count(pool, inserted_timmy.id, false, None) diff --git a/crates/db_views/src/private_message_report_view.rs b/crates/db_views/src/private_message_report_view.rs index 878d79edbadac89736218fbb4cdb6f27ac670f74..134efc05b7b26906f25bf9eb0ccdb8c3ed50a101 100644 --- a/crates/db_views/src/private_message_report_view.rs +++ b/crates/db_views/src/private_message_report_view.rs @@ -56,7 +56,7 @@ fn queries<'a>() -> Queries< let (limit, offset) = limit_and_offset(options.page, options.limit)?; query - .order_by(private_message::published.desc()) + .order_by(private_message::published.asc()) .limit(limit) .offset(offset) .load::<PrivateMessageReportView>(&mut conn)