]> Untitled Git - lemmy.git/blobdiff - crates/api/src/local_user/report_count.rs
Make functions work with both connection and pool (#3420)
[lemmy.git] / crates / api / src / local_user / report_count.rs
index c09280d80f4cc970c1c8f32675502e1ffe7685b5..89bedc2624642d801e429570f50fe36c680b39fe 100644 (file)
@@ -25,13 +25,14 @@ impl Perform for GetReportCount {
     let community_id = data.community_id;
 
     let comment_reports =
-      CommentReportView::get_report_count(context.pool(), person_id, admin, community_id).await?;
+      CommentReportView::get_report_count(&mut context.pool(), person_id, admin, community_id)
+        .await?;
 
     let post_reports =
-      PostReportView::get_report_count(context.pool(), person_id, admin, community_id).await?;
+      PostReportView::get_report_count(&mut context.pool(), person_id, admin, community_id).await?;
 
     let private_message_reports = if admin && community_id.is_none() {
-      Some(PrivateMessageReportView::get_report_count(context.pool()).await?)
+      Some(PrivateMessageReportView::get_report_count(&mut context.pool()).await?)
     } else {
       None
     };