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,7 +1,7 @@
use super::methods::mkcalendar::route_mkcalendar;
use super::methods::report::route_report_calendar;
use super::prop::{
Resourcetype, SupportedCalendarComponent, SupportedCalendarComponentSet, SupportedCalendarData,
SupportedCalendarComponent, SupportedCalendarComponentSet, SupportedCalendarData,
SupportedReportSet,
};
use crate::calendar_object::resource::CalendarObjectResource;
@@ -83,7 +83,7 @@ pub enum CalendarProp {
#[serde(skip_deserializing, untagged)]
#[from]
ExtCommonProperties(CommonPropertiesProp<Resourcetype>),
ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)]
#[default]
@@ -97,9 +97,12 @@ impl Resource for CalendarResource {
type PropName = CalendarPropName;
type Prop = CalendarProp;
type Error = Error;
type ResourceType = Resourcetype;
type PrincipalResource = PrincipalResource;
fn get_resourcetype() -> &'static [&'static str] {
&["collection", "C:calendar"]
}
fn get_prop(
&self,
_rmap: &ResourceMap,