From c30dd100cc901ebd88fc5d8118ca72722081a30b Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 14 Mar 2024 17:09:48 +0100 Subject: [PATCH] fmt --- crates/api_crud/src/post/create.rs | 3 ++- crates/apub/src/objects/post.rs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/api_crud/src/post/create.rs b/crates/api_crud/src/post/create.rs index ddadf8c0f..07d577f51 100644 --- a/crates/api_crud/src/post/create.rs +++ b/crates/api_crud/src/post/create.rs @@ -16,7 +16,7 @@ use lemmy_api_common::{ proxy_image_link_opt_apub, EndpointType, }, -};use lemmy_db_views_actor::structs::CommunityModeratorView; +}; use lemmy_db_schema::{ impls::actor_language::default_post_language, source::{ @@ -29,6 +29,7 @@ use lemmy_db_schema::{ CommunityVisibility, }; use lemmy_db_views::structs::LocalUserView; +use lemmy_db_views_actor::structs::CommunityModeratorView; use lemmy_utils::{ error::{LemmyError, LemmyErrorExt, LemmyErrorType}, spawn_try_task, diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index 403f3775b..4d8841dcc 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -42,6 +42,7 @@ use lemmy_db_schema::{ }, traits::Crud, }; +use lemmy_db_views_actor::structs::CommunityModeratorView; use lemmy_utils::{ error::LemmyError, utils::{markdown::markdown_to_html, slurs::check_slurs_opt, validation::check_url_scheme}, @@ -49,7 +50,6 @@ use lemmy_utils::{ use std::ops::Deref; use stringreader::StringReader; use url::Url; -use lemmy_db_views_actor::structs::CommunityModeratorView; const MAX_TITLE_LENGTH: usize = 200; @@ -179,7 +179,8 @@ impl Object for ApubPost { let creator = page.creator()?.dereference(context).await?; let community = page.community(context).await?; if community.posting_restricted_to_mods { - CommunityModeratorView::is_community_moderator(&mut context.pool(), community.id, creator.id).await?; + CommunityModeratorView::is_community_moderator(&mut context.pool(), community.id, creator.id) + .await?; } let mut name = page .name