mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 12:52:27 +00:00
dav: update get_members
This commit is contained in:
@@ -238,11 +238,7 @@ impl<C: CalendarStore + ?Sized> ResourceService for CalendarResource<C> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_members(
|
async fn get_members(&self, _auth_info: AuthInfo) -> Result<Vec<Self::MemberType>> {
|
||||||
&self,
|
|
||||||
_auth_info: AuthInfo,
|
|
||||||
_path_components: Self::PathComponents,
|
|
||||||
) -> Result<Vec<Self::MemberType>> {
|
|
||||||
// As of now the calendar resource has no members since events are shown with REPORT
|
// As of now the calendar resource has no members since events are shown with REPORT
|
||||||
Ok(vec![])
|
Ok(vec![])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,11 +68,7 @@ impl<C: CalendarStore + ?Sized> ResourceService for EventResource<C> {
|
|||||||
type File = EventFile;
|
type File = EventFile;
|
||||||
type MemberType = EventFile;
|
type MemberType = EventFile;
|
||||||
|
|
||||||
async fn get_members(
|
async fn get_members(&self, _auth_info: AuthInfo) -> Result<Vec<Self::MemberType>> {
|
||||||
&self,
|
|
||||||
_auth_info: AuthInfo,
|
|
||||||
_path_components: Self::PathComponents,
|
|
||||||
) -> Result<Vec<Self::MemberType>> {
|
|
||||||
Ok(vec![])
|
Ok(vec![])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,11 +124,7 @@ impl<C: CalendarStore + ?Sized> ResourceService for PrincipalResource<C> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_members(
|
async fn get_members(&self, _auth_info: AuthInfo) -> Result<Vec<Self::MemberType>> {
|
||||||
&self,
|
|
||||||
_auth_info: AuthInfo,
|
|
||||||
_path_components: Self::PathComponents,
|
|
||||||
) -> Result<Vec<Self::MemberType>> {
|
|
||||||
let calendars = self
|
let calendars = self
|
||||||
.cal_store
|
.cal_store
|
||||||
.read()
|
.read()
|
||||||
|
|||||||
@@ -64,11 +64,7 @@ impl ResourceService for RootResource {
|
|||||||
type MemberType = RootFile;
|
type MemberType = RootFile;
|
||||||
type File = RootFile;
|
type File = RootFile;
|
||||||
|
|
||||||
async fn get_members(
|
async fn get_members(&self, _auth_info: AuthInfo) -> Result<Vec<Self::MemberType>> {
|
||||||
&self,
|
|
||||||
_auth_info: AuthInfo,
|
|
||||||
_path_components: Self::PathComponents,
|
|
||||||
) -> Result<Vec<Self::MemberType>> {
|
|
||||||
Ok(vec![])
|
Ok(vec![])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,7 @@ pub trait ResourceService: Sized {
|
|||||||
|
|
||||||
async fn get_file(&self) -> Result<Self::File>;
|
async fn get_file(&self) -> Result<Self::File>;
|
||||||
|
|
||||||
async fn get_members(
|
async fn get_members(&self, auth_info: AuthInfo) -> Result<Vec<Self::MemberType>>;
|
||||||
&self,
|
|
||||||
auth_info: AuthInfo,
|
|
||||||
path_components: Self::PathComponents,
|
|
||||||
) -> Result<Vec<Self::MemberType>>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
|||||||
@@ -94,10 +94,7 @@ pub async fn handle_propfind<
|
|||||||
let mut member_responses = Vec::new();
|
let mut member_responses = Vec::new();
|
||||||
|
|
||||||
if depth != Depth::Zero {
|
if depth != Depth::Zero {
|
||||||
for member in resource_service
|
for member in resource_service.get_members(auth_info).await? {
|
||||||
.get_members(auth_info, path_components)
|
|
||||||
.await?
|
|
||||||
{
|
|
||||||
member_responses.push(member.propfind(props.clone()).await?);
|
member_responses.push(member.propfind(props.clone()).await?);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user