simplify resourcetype

This commit is contained in:
Lennart
2024-11-04 20:46:16 +01:00
parent ab9c5f6b38
commit 2143bc850c
13 changed files with 98 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
use super::methods::mkcol::route_mkcol;
use super::methods::report::route_report_addressbook;
use super::prop::{Resourcetype, SupportedAddressData, SupportedReportSet};
use super::prop::{SupportedAddressData, SupportedReportSet};
use crate::address_object::resource::AddressObjectResource;
use crate::principal::PrincipalResource;
use crate::Error;
@@ -68,7 +68,7 @@ pub enum AddressbookProp {
#[serde(skip_deserializing, untagged)]
#[from]
ExtCommonProperties(CommonPropertiesProp<Resourcetype>),
ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)]
#[default]
@@ -82,9 +82,12 @@ impl Resource for AddressbookResource {
type PropName = AddressbookPropName;
type Prop = AddressbookProp;
type Error = Error;
type ResourceType = Resourcetype;
type PrincipalResource = PrincipalResource;
fn get_resourcetype() -> &'static [&'static str] {
&["collection", "CARD:addressbook"]
}
fn get_prop(
&self,
_rmap: &ResourceMap,