Work on axum support

This commit is contained in:
Lennart
2025-06-07 20:17:50 +02:00
parent 57832116aa
commit 790c657b08
38 changed files with 582 additions and 64 deletions

View File

@@ -6,11 +6,11 @@ use crate::{
};
use actix_web::{
HttpRequest, Responder,
http::StatusCode,
web::{Data, Path},
};
use calendar_multiget::{CalendarMultigetRequest, get_objects_calendar_multiget};
use calendar_query::{CalendarQueryRequest, get_objects_calendar_query};
use http::StatusCode;
use rustical_dav::{
resource::{PrincipalUri, Resource},
xml::{

View File

@@ -4,7 +4,7 @@ use crate::{
CalendarObjectPropWrapper, CalendarObjectPropWrapperName, CalendarObjectResource,
},
};
use actix_web::http::StatusCode;
use http::StatusCode;
use rustical_dav::{
resource::{PrincipalUri, Resource},
xml::{

View File

@@ -322,7 +322,7 @@ impl<C: CalendarStore, S: SubscriptionStore> CalendarResourceService<C, S> {
}
}
#[async_trait(?Send)]
#[async_trait]
impl<C: CalendarStore, S: SubscriptionStore> ResourceService for CalendarResourceService<C, S> {
type MemberType = CalendarObjectResource;
type PathComponents = (String, String); // principal, calendar_id
@@ -331,6 +331,8 @@ impl<C: CalendarStore, S: SubscriptionStore> ResourceService for CalendarResourc
type Principal = User;
type PrincipalUri = CalDavPrincipalUri;
const DAV_HEADER: &str = "1, 3, access-control, calendar-access";
async fn get_resource(
&self,
(principal, cal_id): &Self::PathComponents,