mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 02:22:21 +00:00
Preparation of a carddav crate
This commit is contained in:
16
src/app.rs
16
src/app.rs
@@ -5,7 +5,6 @@ use actix_web::dev::{ServiceFactory, ServiceRequest, ServiceResponse};
|
||||
use actix_web::middleware::{Logger, NormalizePath};
|
||||
use actix_web::{web, App};
|
||||
use rustical_auth::CheckAuthentication;
|
||||
use rustical_caldav::{configure_dav, configure_well_known};
|
||||
use rustical_store::calendar::CalendarStore;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
@@ -25,10 +24,21 @@ pub fn make_app<CS: CalendarStore + ?Sized, A: CheckAuthentication>(
|
||||
.wrap(Logger::new("[%s] %r"))
|
||||
.wrap(NormalizePath::trim())
|
||||
.service(web::scope("/caldav").configure(|cfg| {
|
||||
configure_dav(cfg, "/caldav".to_string(), auth.clone(), cal_store.clone())
|
||||
rustical_caldav::configure_dav(
|
||||
cfg,
|
||||
"/caldav".to_string(),
|
||||
auth.clone(),
|
||||
cal_store.clone(),
|
||||
)
|
||||
}))
|
||||
.service(web::scope("/carddav").configure(|cfg| {
|
||||
rustical_carddav::configure_dav(cfg, "/carddav".to_string(), auth.clone())
|
||||
}))
|
||||
.service(
|
||||
web::scope("/.well-known")
|
||||
.configure(|cfg| configure_well_known(cfg, "/caldav".to_string())),
|
||||
.configure(|cfg| rustical_caldav::configure_well_known(cfg, "/caldav".to_string()))
|
||||
.configure(|cfg| {
|
||||
rustical_carddav::configure_well_known(cfg, "/carddav".to_string())
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user