fix: exclude invalid prop from allprop

This commit is contained in:
Lennart
2024-12-23 12:06:01 +01:00
parent fa2851dc81
commit 3e870bcbe6
6 changed files with 10 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ pub enum AddressObjectProp {
AddressData(String),
#[serde(other)]
#[strum_discriminants(strum(disabled))]
#[default]
Invalid,
}

View File

@@ -1,5 +1,5 @@
use super::methods::mkcol::route_mkcol;
use super::methods::report::route_report_addressbook;
// use super::methods::report::route_report_addressbook;
use super::prop::{SupportedAddressData, SupportedReportSet};
use crate::address_object::resource::AddressObjectResource;
use crate::principal::PrincipalResource;
@@ -60,6 +60,7 @@ pub enum AddressbookProp {
Getctag(String),
#[serde(other)]
#[strum_discriminants(strum(disabled))]
#[default]
Invalid,
}
@@ -241,8 +242,9 @@ impl<AS: AddressbookStore + ?Sized> ResourceService for AddressbookResourceServi
#[inline]
fn actix_additional_routes(res: actix_web::Resource) -> actix_web::Resource {
let mkcol_method = web::method(Method::from_str("MKCOL").unwrap());
let report_method = web::method(Method::from_str("REPORT").unwrap());
// TODO: Re-enable REPORT
// let report_method = web::method(Method::from_str("REPORT").unwrap());
res.route(mkcol_method.to(route_mkcol::<AS>))
.route(report_method.to(route_report_addressbook::<AS>))
// .route(report_method.to(route_report_addressbook::<AS>))
}
}

View File

@@ -43,6 +43,7 @@ pub enum PrincipalProp {
PrincipalAddress(Option<HrefElement>),
#[serde(other)]
#[strum_discriminants(strum(disabled))]
#[default]
Invalid,
}