mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Fixing clippy
This commit is contained in:
parent
ac2ebc378b
commit
8b4c363c44
@ -5,7 +5,7 @@ use lemmy_api_common::{
|
||||
context::LemmyContext,
|
||||
send_activity::{ActivityChannel, SendActivityData},
|
||||
site::PurgePerson,
|
||||
utils::{delete_local_user_images, is_admin, purge_user_account},
|
||||
utils::{is_admin, purge_user_account},
|
||||
SuccessResponse,
|
||||
};
|
||||
use lemmy_db_schema::{
|
||||
@ -40,7 +40,7 @@ pub async fn purge_person(
|
||||
.await?;
|
||||
|
||||
// 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.
|
||||
let person = Person::update(
|
||||
|
@ -664,13 +664,13 @@ pub async fn purge_image_posts_for_person(
|
||||
}
|
||||
|
||||
/// Delete a local_user's images
|
||||
pub async fn delete_local_user_images(
|
||||
async fn delete_local_user_images(
|
||||
person_id: PersonId,
|
||||
context: &LemmyContext,
|
||||
) -> Result<(), LemmyError> {
|
||||
if let Ok(local_user) = LocalUserView::read_person(&mut context.pool(), person_id).await {
|
||||
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
|
||||
for upload in pictrs_uploads {
|
||||
|
Loading…
Reference in New Issue
Block a user