addressbook_store, add option to not return deleted objects with get_object

#61
This commit is contained in:
Lennart
2025-04-27 18:32:17 +02:00
parent df5f19faab
commit 99388cf992
12 changed files with 71 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
use crate::Error;
use actix_web::web::Path;
use actix_web::{web::Data, HttpResponse};
use rustical_store::{auth::User, Addressbook, AddressbookStore};
use actix_web::{HttpResponse, web::Data};
use rustical_store::{Addressbook, AddressbookStore, auth::User};
use rustical_xml::{XmlDeserialize, XmlDocument, XmlRootTag};
use tracing::instrument;
use tracing_actix_web::RootSpan;
@@ -65,7 +65,10 @@ pub async fn route_mkcol<AS: AddressbookStore>(
push_topic: uuid::Uuid::new_v4().to_string(),
};
match store.get_addressbook(&principal, &addressbook_id).await {
match store
.get_addressbook(&principal, &addressbook_id, true)
.await
{
Err(rustical_store::Error::NotFound) => {
// No conflict, no worries
}