mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 11:42:25 +00:00
Add conversion between Event and EventFile
This commit is contained in:
@@ -39,6 +39,11 @@ pub struct EventFile {
|
|||||||
pub event: Event,
|
pub event: Event,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<Event> for EventFile {
|
||||||
|
fn from(event: Event) -> Self {
|
||||||
|
Self { event }
|
||||||
|
}
|
||||||
|
}
|
||||||
impl Resource for EventFile {
|
impl Resource for EventFile {
|
||||||
type PropType = EventProp;
|
type PropType = EventProp;
|
||||||
type PropResponse = PrincipalPropResponse;
|
type PropResponse = PrincipalPropResponse;
|
||||||
@@ -85,7 +90,6 @@ impl<C: CalendarStore + ?Sized> ResourceService for EventResource<C> {
|
|||||||
.clone()
|
.clone()
|
||||||
.into_inner();
|
.into_inner();
|
||||||
|
|
||||||
// let event = cal_store.read().await.get_event(&cid, &uid).await?;
|
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
cal_store,
|
cal_store,
|
||||||
|
|||||||
Reference in New Issue
Block a user