fixed dependancies and dotenv

master
Griffiths Lott 3 years ago
parent ba21d0dada
commit de68bbaeea
  1. 7
      Cargo.lock
  2. 20
      Cargo.toml.bak
  3. 2
      src/main.rs

7
Cargo.lock generated

@ -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"

@ -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"

@ -42,7 +42,7 @@ async fn search_contract(contract_number: web::Path<String>) -> 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;

Loading…
Cancel
Save