add crate for future frontend

This commit is contained in:
Lennart
2024-08-03 16:32:24 +02:00
parent 076f140923
commit 3869dad772
6 changed files with 170 additions and 4 deletions

View File

@@ -1,11 +1,11 @@
use std::sync::Arc;
use actix_web::body::MessageBody;
use actix_web::dev::{ServiceFactory, ServiceRequest, ServiceResponse};
use actix_web::middleware::{Logger, NormalizePath};
use actix_web::{web, App};
use rustical_auth::CheckAuthentication;
use rustical_frontend::configure_frontend;
use rustical_store::CalendarStore;
use std::sync::Arc;
use tokio::sync::RwLock;
pub fn make_app<CS: CalendarStore + ?Sized, A: CheckAuthentication>(
@@ -40,4 +40,8 @@ pub fn make_app<CS: CalendarStore + ?Sized, A: CheckAuthentication>(
// rustical_carddav::configure_well_known(cfg, "/carddav".to_string())
// }),
)
.service(
web::scope("/frontend").configure(|cfg| configure_frontend(cfg, cal_store.clone())),
)
.service(web::redirect("/", "/frontend").permanent())
}