mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Move well-known routes to main::app.rs
This commit is contained in:
@@ -24,10 +24,6 @@ mod subscription;
|
|||||||
|
|
||||||
pub use error::Error;
|
pub use error::Error;
|
||||||
|
|
||||||
pub fn configure_well_known(cfg: &mut web::ServiceConfig, caldav_root: String) {
|
|
||||||
cfg.service(web::redirect("/caldav", caldav_root).permanent());
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn configure_dav<
|
pub fn configure_dav<
|
||||||
AP: AuthenticationProvider,
|
AP: AuthenticationProvider,
|
||||||
AS: AddressbookStore,
|
AS: AddressbookStore,
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ pub mod addressbook;
|
|||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod principal;
|
pub mod principal;
|
||||||
|
|
||||||
pub fn configure_well_known(cfg: &mut web::ServiceConfig, carddav_root: String) {
|
|
||||||
cfg.service(web::redirect("/carddav", carddav_root).permanent());
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn configure_dav<AP: AuthenticationProvider, A: AddressbookStore, S: SubscriptionStore>(
|
pub fn configure_dav<AP: AuthenticationProvider, A: AddressbookStore, S: SubscriptionStore>(
|
||||||
cfg: &mut web::ServiceConfig,
|
cfg: &mut web::ServiceConfig,
|
||||||
auth_provider: Arc<AP>,
|
auth_provider: Arc<AP>,
|
||||||
|
|||||||
@@ -46,10 +46,8 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
|||||||
}))
|
}))
|
||||||
.service(
|
.service(
|
||||||
web::scope("/.well-known")
|
web::scope("/.well-known")
|
||||||
.configure(|cfg| rustical_caldav::configure_well_known(cfg, "/caldav".to_string()))
|
.service(web::redirect("/caldav", "/caldav"))
|
||||||
.configure(|cfg| {
|
.service(web::redirect("/carddav", "/carddav")),
|
||||||
rustical_carddav::configure_well_known(cfg, "/carddav".to_string())
|
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if frontend_config.enabled {
|
if frontend_config.enabled {
|
||||||
|
|||||||
Reference in New Issue
Block a user