ZIP import / export now include inbox content

This commit is contained in:
2025-05-08 17:35:17 +02:00
parent 6e0d0fb48d
commit 55f2679d1a
3 changed files with 57 additions and 6 deletions

View File

@@ -111,3 +111,11 @@ pub async fn delete(id: InboxEntryID) -> anyhow::Result<()> {
diesel::delete(inbox::dsl::inbox.filter(inbox::dsl::id.eq(id.0))).execute(&mut db()?)?;
Ok(())
}
/// Delete all the inbox entries of a user
pub async fn delete_all_user(user: UserID) -> anyhow::Result<()> {
for inbox_entry in get_list_user(user).await? {
delete(inbox_entry.id()).await?;
}
Ok(())
}