From 67316806b103bac8156529b37ae31b2e6e8b314a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Calder=C3=B3n?= Date: Fri, 1 Sep 2023 10:07:38 -0300 Subject: [PATCH] Fix db string (#105) * Some improvements on config file and db file * small fix on db string for connection --------- Co-authored-by: Arkanoider Co-authored-by: arkanoider <113362043+arkanoider@users.noreply.github.com> --- src/db.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 578cd63..c2ca079 100644 --- a/src/db.rs +++ b/src/db.rs @@ -11,7 +11,8 @@ use crate::settings::Settings; pub async fn connect() -> Result, sqlx::Error> { let db_settings = Settings::get_db(); - let db_url = db_settings.url; + let mut db_url = db_settings.url; + db_url.push_str("mostro.db"); if !Sqlite::database_exists(&db_url).await.unwrap_or(false) { panic!("Not database found, please create a new one first!"); }