From d0c47b93fe19a9ebc35d624b9dbed7d1d539ecaa Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 18 Mar 2024 20:45:30 +0100 Subject: Rework webdav types --- aero-proto/src/dav.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'aero-proto') diff --git a/aero-proto/src/dav.rs b/aero-proto/src/dav.rs index 252cae8..480d163 100644 --- a/aero-proto/src/dav.rs +++ b/aero-proto/src/dav.rs @@ -375,18 +375,18 @@ trait DavNode: Send { // ----- common /// building DAV responses - fn multistatus_name(&self, user: &ArcUser, depth: dav::Depth) -> dav::Multistatus> { + fn multistatus_name(&self, user: &ArcUser, depth: dav::Depth) -> dav::Multistatus { let mut names = vec![(self.path(user), self.supported_properties(user))]; if matches!(depth, dav::Depth::One | dav::Depth::Infinity) { names.extend(self.children(user).iter().map(|c| (c.path(user), c.supported_properties(user)))); } - dav::Multistatus::> { + dav::Multistatus:: { responses: names.into_iter().map(|(url, names)| dav::Response { status_or_propstat: dav::StatusOrPropstat::PropStat( dav::Href(url), vec![dav::PropStat { - prop: names, + prop: dav::AnyProp(names.0.into_iter().map(dav::AnyProperty::Request).collect()), status: dav::Status(hyper::StatusCode::OK), error: None, responsedescription: None, @@ -400,7 +400,7 @@ trait DavNode: Send { } } - fn multistatus_val(&self, user: &ArcUser, props: &dav::PropName, depth: dav::Depth) -> dav::Multistatus> { + fn multistatus_val(&self, user: &ArcUser, props: &dav::PropName, depth: dav::Depth) -> dav::Multistatus { let mut values = vec![(self.path(user), self.properties(user, props))]; if matches!(depth, dav::Depth::One | dav::Depth::Infinity) { values.extend(self @@ -410,12 +410,12 @@ trait DavNode: Send { ); } - dav::Multistatus::> { + dav::Multistatus:: { responses: values.into_iter().map(|(url, propval)| dav::Response { status_or_propstat: dav::StatusOrPropstat::PropStat( dav::Href(url), vec![dav::PropStat { - prop: propval, + prop: dav::AnyProp(propval.0.into_iter().map(dav::AnyProperty::Value).collect()), status: dav::Status(hyper::StatusCode::OK), error: None, responsedescription: None, -- cgit v1.2.3