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

@@ -1,9 +1,8 @@
use actix_web::HttpRequest;
use chrono::{DateTime, Utc};
use rustical_dav::{
methods::propfind::{PropElement, PropfindType},
resource::{CommonPropertiesProp, EitherProp, Resource},
xml::{multistatus::PropstatWrapper, MultistatusElement},
xml::{MultistatusElement, PropElement, PropfindType},
};
use rustical_store::{auth::User, CalendarObject, CalendarStore};
use serde::Deserialize;
@@ -210,13 +209,8 @@ pub async fn handle_calendar_query<C: CalendarStore + ?Sized>(
principal: &str,
cal_id: &str,
cal_store: &C,
) -> Result<
MultistatusElement<
PropstatWrapper<EitherProp<CalendarObjectProp, CommonPropertiesProp>>,
String,
>,
Error,
> {
) -> Result<MultistatusElement<EitherProp<CalendarObjectProp, CommonPropertiesProp>, String>, Error>
{
let objects = get_objects_calendar_query(&cal_query, principal, cal_id, cal_store).await?;
let props = match cal_query.prop {