ical: Work on calendar object data structure

This commit is contained in:
Lennart
2025-07-25 21:44:57 +02:00
parent 9910e4ee31
commit dd34dd23d1
9 changed files with 73 additions and 82 deletions

View File

@@ -78,12 +78,13 @@ pub async fn put_event<C: CalendarStore>(
true
};
let object = match CalendarObject::from_ics(object_id, body) {
let object = match CalendarObject::from_ics(body) {
Ok(obj) => obj,
Err(_) => {
return Err(Error::PreconditionFailed(Precondition::ValidCalendarData));
}
};
assert_eq!(object.get_id(), object_id);
cal_store
.put_object(principal, calendar_id, object, overwrite)
.await?;