- let person_id = local_user_view.person.id;
- let admin = local_user_view.person.admin;
- let community_id = data.community_id;
- let unresolved_only = data.unresolved_only;
-
- let page = data.page;
- let limit = data.limit;
- let comment_reports = blocking(context.pool(), move |conn| {
- CommentReportQueryBuilder::create(conn, person_id, admin)
- .community_id(community_id)
- .unresolved_only(unresolved_only)
- .page(page)
- .limit(limit)
- .list()
- })
- .await??;
-
- let res = ListCommentReportsResponse { comment_reports };
-
- Ok(res)