Fixing clippy

This commit is contained in:
Dessalines 2024-03-27 09:59:34 -04:00
parent ac2ebc378b
commit 8b4c363c44
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext,
send_activity::{ActivityChannel, SendActivityData}, send_activity::{ActivityChannel, SendActivityData},
site::PurgePerson, site::PurgePerson,
utils::{delete_local_user_images, is_admin, purge_user_account}, utils::{is_admin, purge_user_account},
SuccessResponse, SuccessResponse,
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{
@ -40,7 +40,7 @@ pub async fn purge_person(
.await?; .await?;
// Clear profile data. // Clear profile data.
purge_user_account(data.person_id, &mut context.pool()).await?; purge_user_account(data.person_id, &context).await?;
// Keep person record, but mark as banned to prevent login or refetching from home instance. // Keep person record, but mark as banned to prevent login or refetching from home instance.
let person = Person::update( let person = Person::update(

View file

@ -664,13 +664,13 @@ pub async fn purge_image_posts_for_person(
} }
/// Delete a local_user's images /// Delete a local_user's images
pub async fn delete_local_user_images( async fn delete_local_user_images(
person_id: PersonId, person_id: PersonId,
context: &LemmyContext, context: &LemmyContext,
) -> Result<(), LemmyError> { ) -> Result<(), LemmyError> {
if let Ok(local_user) = LocalUserView::read_person(&mut context.pool(), person_id).await { if let Ok(local_user) = LocalUserView::read_person(&mut context.pool(), person_id).await {
let pictrs_uploads = let pictrs_uploads =
LocalImage::get_all_by_local_user_id(&mut context.pool(), &local_user.local_user.id).await?; LocalImage::get_all_by_local_user_id(&mut context.pool(), local_user.local_user.id).await?;
// Delete their images // Delete their images
for upload in pictrs_uploads { for upload in pictrs_uploads {