diff options
| author | mrw1593 <botahamec@outlook.com> | 2023-05-13 12:46:09 -0400 |
|---|---|---|
| committer | mrw1593 <botahamec@outlook.com> | 2023-05-29 10:45:55 -0400 |
| commit | dc08e1486c919dc8f168543adeb86cfe1f3b645e (patch) | |
| tree | faec648a182d9dda738b0c7e859d22deae2c7f49 /src/services/db.rs | |
| parent | 0b55587443103b20491139d54670474a35286be8 (diff) | |
Make secrets more secret
Diffstat (limited to 'src/services/db.rs')
| -rw-r--r-- | src/services/db.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/services/db.rs b/src/services/db.rs index 80335c4..b24c640 100644 --- a/src/services/db.rs +++ b/src/services/db.rs @@ -33,9 +33,8 @@ impl TryFrom<UserRow> for User { } /// Intialize the connection pool -pub async fn initialize(db: &str, user: &str, password: &str) -> Result<MySqlPool, RawUnexpected> { - let url = format!("mysql://{user}:{password}@localhost/{db}"); - MySqlPool::connect(&url).await.unexpect() +pub async fn initialize(db_url: &str) -> Result<MySqlPool, RawUnexpected> { + MySqlPool::connect(db_url).await.unexpect() } pub async fn user_id_exists<'c>( |
