From d0f652a9518212754e91f57c775fa21940255fcc Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Sat, 25 May 2024 22:08:37 +0200 Subject: [PATCH] dav: update get_members --- crates/caldav/src/resources/calendar.rs | 6 +----- crates/caldav/src/resources/event.rs | 6 +----- crates/caldav/src/resources/principal.rs | 6 +----- crates/caldav/src/resources/root.rs | 6 +----- crates/dav/src/dav_resource.rs | 6 +----- crates/dav/src/propfind.rs | 5 +---- 6 files changed, 6 insertions(+), 29 deletions(-) diff --git a/crates/caldav/src/resources/calendar.rs b/crates/caldav/src/resources/calendar.rs index 1c0448e..19e684a 100644 --- a/crates/caldav/src/resources/calendar.rs +++ b/crates/caldav/src/resources/calendar.rs @@ -238,11 +238,7 @@ impl ResourceService for CalendarResource { }) } - async fn get_members( - &self, - _auth_info: AuthInfo, - _path_components: Self::PathComponents, - ) -> Result> { + async fn get_members(&self, _auth_info: AuthInfo) -> Result> { // As of now the calendar resource has no members since events are shown with REPORT Ok(vec![]) } diff --git a/crates/caldav/src/resources/event.rs b/crates/caldav/src/resources/event.rs index 38cd840..e08e61b 100644 --- a/crates/caldav/src/resources/event.rs +++ b/crates/caldav/src/resources/event.rs @@ -68,11 +68,7 @@ impl ResourceService for EventResource { type File = EventFile; type MemberType = EventFile; - async fn get_members( - &self, - _auth_info: AuthInfo, - _path_components: Self::PathComponents, - ) -> Result> { + async fn get_members(&self, _auth_info: AuthInfo) -> Result> { Ok(vec![]) } diff --git a/crates/caldav/src/resources/principal.rs b/crates/caldav/src/resources/principal.rs index b807c0f..2495ec7 100644 --- a/crates/caldav/src/resources/principal.rs +++ b/crates/caldav/src/resources/principal.rs @@ -124,11 +124,7 @@ impl ResourceService for PrincipalResource { }) } - async fn get_members( - &self, - _auth_info: AuthInfo, - _path_components: Self::PathComponents, - ) -> Result> { + async fn get_members(&self, _auth_info: AuthInfo) -> Result> { let calendars = self .cal_store .read() diff --git a/crates/caldav/src/resources/root.rs b/crates/caldav/src/resources/root.rs index 8f45651..fa38f6d 100644 --- a/crates/caldav/src/resources/root.rs +++ b/crates/caldav/src/resources/root.rs @@ -64,11 +64,7 @@ impl ResourceService for RootResource { type MemberType = RootFile; type File = RootFile; - async fn get_members( - &self, - _auth_info: AuthInfo, - _path_components: Self::PathComponents, - ) -> Result> { + async fn get_members(&self, _auth_info: AuthInfo) -> Result> { Ok(vec![]) } diff --git a/crates/dav/src/dav_resource.rs b/crates/dav/src/dav_resource.rs index dfd8ac1..2c89167 100644 --- a/crates/dav/src/dav_resource.rs +++ b/crates/dav/src/dav_resource.rs @@ -41,11 +41,7 @@ pub trait ResourceService: Sized { async fn get_file(&self) -> Result; - async fn get_members( - &self, - auth_info: AuthInfo, - path_components: Self::PathComponents, - ) -> Result>; + async fn get_members(&self, auth_info: AuthInfo) -> Result>; } #[derive(Serialize)] diff --git a/crates/dav/src/propfind.rs b/crates/dav/src/propfind.rs index 3cd2e13..909f5a8 100644 --- a/crates/dav/src/propfind.rs +++ b/crates/dav/src/propfind.rs @@ -94,10 +94,7 @@ pub async fn handle_propfind< let mut member_responses = Vec::new(); if depth != Depth::Zero { - for member in resource_service - .get_members(auth_info, path_components) - .await? - { + for member in resource_service.get_members(auth_info).await? { member_responses.push(member.propfind(props.clone()).await?); } }