summaryrefslogtreecommitdiff
path: root/src/services/db.rs
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-05-13 12:46:09 -0400
committermrw1593 <botahamec@outlook.com>2023-05-29 10:45:55 -0400
commitdc08e1486c919dc8f168543adeb86cfe1f3b645e (patch)
treefaec648a182d9dda738b0c7e859d22deae2c7f49 /src/services/db.rs
parent0b55587443103b20491139d54670474a35286be8 (diff)
Make secrets more secret
Diffstat (limited to 'src/services/db.rs')
-rw-r--r--src/services/db.rs5
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>(