use crate::Perform;
use actix_web::web::Data;
use lemmy_api_common::{
- blocking,
- get_local_user_view_from_jwt,
- is_mod_or_admin,
post::{PostReportResponse, ResolvePostReport},
+ utils::{blocking, get_local_user_view_from_jwt, is_mod_or_admin},
};
use lemmy_db_schema::{source::post_report::PostReport, traits::Reportable};
-use lemmy_db_views::post_report_view::PostReportView;
-use lemmy_utils::{ConnectionId, LemmyError};
+use lemmy_db_views::structs::PostReportView;
+use lemmy_utils::{error::LemmyError, ConnectionId};
use lemmy_websocket::{messages::SendModRoomMessage, LemmyContext, UserOperation};
/// Resolves or unresolves a post report and notifies the moderators of the community
is_mod_or_admin(context.pool(), person_id, report.community.id).await?;
let resolved = data.resolved;
- let resolve_fun = move |conn: &'_ _| {
+ let resolve_fun = move |conn: &mut _| {
if resolved {
PostReport::resolve(conn, report_id, person_id)
} else {