From e17e4facd7d5906034ecbbd3278e71fe227316d5 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:17:15 +0200 Subject: [PATCH] Remove frontend crate --- Cargo.lock | 78 -------------------------------------- Cargo.toml | 1 - crates/frontend/src/lib.rs | 10 ----- src/main.rs | 5 --- 4 files changed, 94 deletions(-) delete mode 100644 crates/frontend/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index cd450bc..7b7290d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,29 +19,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "actix-files" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d832782fac6ca7369a70c9ee9a20554623c5e51c76e190ad151780ebea1cf689" -dependencies = [ - "actix-http", - "actix-service", - "actix-utils", - "actix-web", - "askama_escape", - "bitflags 1.3.2", - "bytes", - "derive_more", - "futures-core", - "http-range", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite", -] - [[package]] name = "actix-http" version = "3.4.0" @@ -360,12 +337,6 @@ dependencies = [ "password-hash", ] -[[package]] -name = "askama_escape" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" - [[package]] name = "async-trait" version = "0.1.73" @@ -1061,12 +1032,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-range" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" - [[package]] name = "httparse" version = "1.8.0" @@ -1289,25 +1254,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "minijinja" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c43c912b380856deeb78d826e3b77df13a90e69aef6223e3ad28c02d2ca857" -dependencies = [ - "serde", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1703,7 +1649,6 @@ dependencies = [ "rustical_api", "rustical_auth", "rustical_caldav", - "rustical_frontend", "rustical_store", "serde", "tokio", @@ -1771,20 +1716,6 @@ dependencies = [ "rustical_auth", ] -[[package]] -name = "rustical_frontend" -version = "0.1.0" -dependencies = [ - "actix-files", - "actix-web", - "anyhow", - "minijinja", - "rustical_store", - "serde", - "serde_json", - "tokio", -] - [[package]] name = "rustical_store" version = "0.1.0" @@ -2453,15 +2384,6 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.13" diff --git a/Cargo.toml b/Cargo.toml index 8170665..5be8ee6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ rustical_store = { path = "./crates/store/" } rustical_auth = { path = "./crates/auth/" } rustical_api = { path = "./crates/api/" } rustical_caldav = { path = "./crates/caldav/" } -rustical_frontend = { path = "./crates/frontend/" } serde = { version = "1.0.188", features = ["derive"] } tokio = { version = "1.32.0", features = [ "net", diff --git a/crates/frontend/src/lib.rs b/crates/frontend/src/lib.rs deleted file mode 100644 index ae5dc89..0000000 --- a/crates/frontend/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -use actix_web::{ - web::{self, Data}, - HttpResponse, -}; -use rustical_store::calendar::CalendarStore; -use tokio::sync::RwLock; - -pub fn configure_frontend(cfg: &mut web::ServiceConfig, store: Data>) { - cfg.app_data(store); -} diff --git a/src/main.rs b/src/main.rs index e0b7397..c21a9be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,6 @@ use config::{CalendarStoreConfig, TomlCalendarStoreConfig}; use rustical_api::configure_api; use rustical_auth::AuthProvider; use rustical_caldav::{configure_dav, configure_well_known}; -use rustical_frontend::configure_frontend; use rustical_store::toml_store::TomlCalendarStore; use std::fs; use std::sync::Arc; @@ -55,10 +54,6 @@ async fn main() -> Result<()> { .service( web::scope("/api").configure(|cfg| configure_api(cfg, cal_store.clone().into())), ) - .service( - web::scope("/frontend") - .configure(|cfg| configure_frontend(cfg, cal_store.clone().into())), - ) }) .bind(("0.0.0.0", 4000))? .run()