mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Remove all that extension business and replace with internal properties
This commit is contained in:
@@ -13,7 +13,6 @@ use actix_web::web;
|
||||
use actix_web::{web::Data, HttpRequest};
|
||||
use async_trait::async_trait;
|
||||
use derive_more::derive::{From, Into};
|
||||
use rustical_dav::extensions::CommonPropertiesProp;
|
||||
use rustical_dav::privileges::UserPrivilegeSet;
|
||||
use rustical_dav::resource::{Resource, ResourceService};
|
||||
use rustical_store::auth::User;
|
||||
@@ -46,7 +45,7 @@ pub enum CalendarPropName {
|
||||
Getctag,
|
||||
}
|
||||
|
||||
#[derive(Default, Deserialize, Serialize, From, PartialEq)]
|
||||
#[derive(Default, Deserialize, Serialize, PartialEq)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum CalendarProp {
|
||||
// WebDAV (RFC 2518)
|
||||
@@ -83,10 +82,6 @@ pub enum CalendarProp {
|
||||
// Didn't find the spec
|
||||
Getctag(String),
|
||||
|
||||
#[serde(skip_deserializing, rename = "$value")]
|
||||
#[from]
|
||||
ExtCommonProperties(CommonPropertiesProp),
|
||||
|
||||
#[serde(other)]
|
||||
#[default]
|
||||
Invalid,
|
||||
@@ -183,7 +178,6 @@ impl Resource for CalendarResource {
|
||||
CalendarProp::SyncToken(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarProp::Getctag(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarProp::Invalid => Err(rustical_dav::Error::PropReadOnly),
|
||||
_ => panic!("we shouldn't end up here"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user