Implement download feature for calendars and addressbooks

Fixes #70
This commit is contained in:
Lennart
2025-06-10 17:23:11 +02:00
parent 300a0024ee
commit 103ac0b1f9
16 changed files with 223 additions and 15 deletions

View File

@@ -1,3 +1,4 @@
use crate::calendar::methods::get::route_get;
use crate::calendar::methods::mkcalendar::route_mkcalendar;
use crate::calendar::methods::report::route_report_calendar;
use crate::calendar::resource::CalendarResource;
@@ -118,6 +119,13 @@ impl<C: CalendarStore, S: SubscriptionStore> AxumMethods for CalendarResourceSer
})
}
fn get() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>> {
Some(|state, req| {
let mut service = Handler::with_state(route_get::<C, S>, state);
Box::pin(Service::call(&mut service, req))
})
}
fn mkcalendar() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>>
{
Some(|state, req| {