From 6d1a2f59c09ed53fb5350d96f69c307c57d8f677 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Fri, 4 Oct 2024 20:07:19 +0200 Subject: [PATCH] edit resource.rs --- crates/dav/src/resource.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/dav/src/resource.rs b/crates/dav/src/resource.rs index 879798d..ae15312 100644 --- a/crates/dav/src/resource.rs +++ b/crates/dav/src/resource.rs @@ -171,14 +171,15 @@ pub trait ResourceService: Sized + 'static { #[inline] fn actix_resource() -> actix_web::Resource { - let propfind_method = || web::method(Method::from_str("PROPFIND").unwrap()); - let proppatch_method = || web::method(Method::from_str("PROPPATCH").unwrap()); - Self::actix_additional_routes( web::resource("") .name(Self::resource_name()) - .route(propfind_method().to(route_propfind::)) - .route(proppatch_method().to(route_proppatch::)) + .route( + web::method(Method::from_str("PROPFIND").unwrap()).to(route_propfind::), + ) + .route( + web::method(Method::from_str("PROPPATCH").unwrap()).to(route_proppatch::), + ) .delete(route_delete::), ) }