From de68bbaeea45875f19361d088d08bfdc3915bc59 Mon Sep 17 00:00:00 2001 From: Griffiths Lott Date: Wed, 2 Nov 2022 13:29:06 -0400 Subject: [PATCH] fixed dependancies and dotenv --- Cargo.lock | 7 +++++++ Cargo.toml.bak | 20 -------------------- src/main.rs | 2 +- 3 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 Cargo.toml.bak diff --git a/Cargo.lock b/Cargo.lock index 0b48205..201f1b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,6 +7,7 @@ name = "FSS" version = "0.1.0" dependencies = [ "connectorx", + "dotenv", "polars", "tiberius", "tokio", @@ -392,6 +393,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + [[package]] name = "dyn-clone" version = "1.0.9" diff --git a/Cargo.toml.bak b/Cargo.toml.bak deleted file mode 100644 index 386f257..0000000 --- a/Cargo.toml.bak +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "FSS" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tiberius = {version = "0.11.2", features = ["winauth", "rust_decimal", "chrono"]} -tokio = {version = "1.21.2", features = ["full"]} -tokio-util = {version = "0.7.4", features = ["full"]} -chrono = {version = "0.4.22", features = ["serde"]} -actix-web = "4" -serde = {version = "1.0.147", features = ["derive"]} -serde_json = "1.0.87" -walkdir = "2.3.2" - -[target.x86_64-pc-windows-gnu] -linker = "/usr/bin/$ARCH-w64-mingw32-gcc" -ar = "/usr/$ARCH-w64-mingw32/bin/ar" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 3eca394..c5a5ac0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,7 @@ async fn search_contract(contract_number: web::Path) -> HttpResponse { let mut config = Config::new(); config.host("172.16.181.143"); config.port(1433); - config.authentication(AuthMethod::windows(var("USER_NAME").except("No USER_NAME set in .env"), var("PASSWORD").except("No PASSWORD set in .env"))); + config.authentication(AuthMethod::windows(var("USER_NAME").expect("No USER_NAME set in .env"), var("PASSWORD").expect("No PASSWORD set in .env"))); config.trust_cert(); // on production, it is not a good idea to do this let paid_in_full = get_paid_in_full(config.clone(), contract_number.to_string()).await;