From dc08e1486c919dc8f168543adeb86cfe1f3b645e Mon Sep 17 00:00:00 2001 From: mrw1593 Date: Sat, 13 May 2023 12:46:09 -0400 Subject: Make secrets more secret --- src/services/db.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/services/db.rs') 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 for User { } /// Intialize the connection pool -pub async fn initialize(db: &str, user: &str, password: &str) -> Result { - let url = format!("mysql://{user}:{password}@localhost/{db}"); - MySqlPool::connect(&url).await.unexpect() +pub async fn initialize(db_url: &str) -> Result { + MySqlPool::connect(db_url).await.unexpect() } pub async fn user_id_exists<'c>( -- cgit v1.2.3