Skip to content

Commit

Permalink
Urlencode DB PASS
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperzuk-neti committed Sep 17, 2024
1 parent c657aae commit 55df920
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 262 deletions.
268 changes: 7 additions & 261 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions fplus-database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ serde = { version = "1.0.164", features = ["derive", "std",
serial_test = "3.0.0"
sha1 = "0.10.6"
serde_json = "1.0.96"
urlencoding = "2.1.3"
2 changes: 1 addition & 1 deletion fplus-database/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub async fn setup() -> Result<(), DbErr> {
format!(
"postgres://{}:{}@{}:{}/{}?{}",
get_env_or_throw("DB_USER"),
get_env_or_throw("DB_PASS"),
urlencoding::encode(&get_env_or_throw("DB_PASS")),
get_env_or_throw("DB_HOST"),
std::env::var("DB_PORT").unwrap_or("5432".into()),
get_env_or_throw("DB_NAME"),
Expand Down

0 comments on commit 55df920

Please sign in to comment.