Refactoring

This commit is contained in:
Lennart
2024-11-06 15:57:10 +01:00
parent ae4d5f0fc6
commit c21993ab15
17 changed files with 85 additions and 128 deletions

View File

@@ -4,12 +4,9 @@ use crate::{
};
use actix_web::{http::StatusCode, HttpRequest};
use rustical_dav::{
methods::propfind::{PropElement, PropfindType},
resource::{CommonPropertiesProp, EitherProp, Resource},
xml::{
multistatus::{PropstatWrapper, ResponseElement},
MultistatusElement,
},
xml::{multistatus::ResponseElement, MultistatusElement},
xml::{PropElement, PropfindType},
};
use rustical_store::{
auth::User,
@@ -47,13 +44,8 @@ pub async fn handle_sync_collection<AS: AddressbookStore + ?Sized>(
principal: &str,
addressbook_id: &str,
addr_store: &AS,
) -> Result<
MultistatusElement<
PropstatWrapper<EitherProp<AddressObjectProp, CommonPropertiesProp>>,
String,
>,
Error,
> {
) -> Result<MultistatusElement<EitherProp<AddressObjectProp, CommonPropertiesProp>, String>, Error>
{
let props = match sync_collection.prop {
PropfindType::Allprop => {
vec!["allprop".to_owned()]