diff options
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>( |
