diff --git a/src/main.rs b/src/main.rs index 0be249e..4aa3a4d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,9 @@ mod services; mod utils; #[tokio::main] -async fn main() { main_start().await } +async fn main() { + main_start().await +} /// Use this, to get autocomplete. As the tokio::main macro messes with the LSP async fn main_start() { @@ -20,10 +22,10 @@ async fn main_start() { Err(error) => { println!("Error connecting with the database: {error}"); panic!(); - }, + } }); routes::main_router::start_all_routes(start_time, db_conn) - .await - .unwrap(); -} \ No newline at end of file + .await + .unwrap(); +} diff --git a/src/routes/click.rs b/src/routes/click.rs index e69de29..8b13789 100644 --- a/src/routes/click.rs +++ b/src/routes/click.rs @@ -0,0 +1 @@ + diff --git a/src/routes/main_router.rs b/src/routes/main_router.rs index 8759e1d..36835ab 100644 --- a/src/routes/main_router.rs +++ b/src/routes/main_router.rs @@ -1,5 +1,4 @@ - -use std::{sync::Arc}; +use std::sync::Arc; use actix_cors::Cors; use actix_multipart::form::MultipartFormConfig; @@ -31,21 +30,17 @@ pub async fn start_all_routes(start_time: i64, db_conn: Arc) -> Result<( .app_data(MultipartFormConfig::default().memory_limit(52_428_800)) .service( web::scope("/api") - .service( - web::scope("/admin") - ) - .service( - web::scope("/read") - ) + .service(web::scope("/admin")) + .service(web::scope("/read")), ) - - /*.service( - spa() - .index_file("./dist/index.html") - .static_resources_mount("/") - .static_resources_location("./dist") - .finish() - )*/ + + /*.service( + spa() + .index_file("./dist/index.html") + .static_resources_mount("/") + .static_resources_location("./dist") + .finish() + )*/ }) .bind((HOST_ADDR, HOST_PORT))? .run(); diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 4789e27..0aa36e4 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,7 +1,7 @@ -pub mod main_router; pub mod click; +pub mod main_router; pub mod project; pub mod property; pub mod realtor; pub mod trackable; -pub mod view; \ No newline at end of file +pub mod view; diff --git a/src/routes/project.rs b/src/routes/project.rs index e69de29..8b13789 100644 --- a/src/routes/project.rs +++ b/src/routes/project.rs @@ -0,0 +1 @@ + diff --git a/src/routes/property.rs b/src/routes/property.rs index e69de29..8b13789 100644 --- a/src/routes/property.rs +++ b/src/routes/property.rs @@ -0,0 +1 @@ + diff --git a/src/routes/realtor.rs b/src/routes/realtor.rs index e69de29..8b13789 100644 --- a/src/routes/realtor.rs +++ b/src/routes/realtor.rs @@ -0,0 +1 @@ + diff --git a/src/routes/trackable.rs b/src/routes/trackable.rs index e69de29..8b13789 100644 --- a/src/routes/trackable.rs +++ b/src/routes/trackable.rs @@ -0,0 +1 @@ + diff --git a/src/routes/view.rs b/src/routes/view.rs index e69de29..8b13789 100644 --- a/src/routes/view.rs +++ b/src/routes/view.rs @@ -0,0 +1 @@ + diff --git a/src/services/click.rs b/src/services/click.rs index e69de29..8b13789 100644 --- a/src/services/click.rs +++ b/src/services/click.rs @@ -0,0 +1 @@ + diff --git a/src/services/mod.rs b/src/services/mod.rs index 71f0405..d7b1331 100644 --- a/src/services/mod.rs +++ b/src/services/mod.rs @@ -3,4 +3,4 @@ pub mod project; pub mod property; pub mod realtor; pub mod trackable; -pub mod view; \ No newline at end of file +pub mod view; diff --git a/src/services/project.rs b/src/services/project.rs index e69de29..8b13789 100644 --- a/src/services/project.rs +++ b/src/services/project.rs @@ -0,0 +1 @@ + diff --git a/src/services/property.rs b/src/services/property.rs index e69de29..8b13789 100644 --- a/src/services/property.rs +++ b/src/services/property.rs @@ -0,0 +1 @@ + diff --git a/src/services/realtor.rs b/src/services/realtor.rs index e69de29..8b13789 100644 --- a/src/services/realtor.rs +++ b/src/services/realtor.rs @@ -0,0 +1 @@ + diff --git a/src/services/trackable.rs b/src/services/trackable.rs index e69de29..8b13789 100644 --- a/src/services/trackable.rs +++ b/src/services/trackable.rs @@ -0,0 +1 @@ + diff --git a/src/services/view.rs b/src/services/view.rs index e69de29..8b13789 100644 --- a/src/services/view.rs +++ b/src/services/view.rs @@ -0,0 +1 @@ + diff --git a/src/utils/mod.rs b/src/utils/mod.rs index da8e70c..7b9ff63 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1,4 +1,4 @@ #[allow(unused)] pub mod macros; #[allow(unused)] -pub mod s3; \ No newline at end of file +pub mod s3;