dav proppatch: remove debug and todos

This commit is contained in:
Lennart
2024-10-27 00:43:42 +02:00
parent c4f68e2cf1
commit 42f2ea6ff9

View File

@@ -61,8 +61,6 @@ pub async fn route_proppatch<R: ResourceService>(
let href = req.path().to_owned();
let resource_service = R::new(&req, path_components.clone()).await?;
debug!("{body}");
let PropertyupdateElement::<<R::Resource as Resource>::Prop> { operations } =
quick_xml::de::from_str(&body).map_err(Error::XmlDecodeError)?;
@@ -102,15 +100,13 @@ pub async fn route_proppatch<R: ResourceService>(
props_conflict.push(propname);
}
Err(err) => {
// TODO: Think about error handling?
return Err(err.into());
}
}
}
Operation::Remove(_remove_el) => {
match <<R::Resource as Resource>::PropName as FromStr>::from_str(&propname) {
Ok(prop) => {
match resource.remove_prop(prop) {
Ok(prop) => match resource.remove_prop(prop) {
Ok(()) => {
props_ok.push(propname);
}
@@ -118,11 +114,9 @@ pub async fn route_proppatch<R: ResourceService>(
props_conflict.push(propname);
}
Err(err) => {
// TODO: Think about error handling?
return Err(err.into());
}
}
}
},
Err(_) => {
// I guess removing a nonexisting property should be successful :)
props_ok.push(propname);