From 9f29f6cd077a1582e9ff26fd20c5996384c7f7b2 Mon Sep 17 00:00:00 2001 From: Tony Klink Date: Thu, 25 Jan 2024 21:13:55 -0600 Subject: [PATCH] Use db-path from Config --- src/noose/sqlite.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/noose/sqlite.rs b/src/noose/sqlite.rs index 43f2b77..f471873 100644 --- a/src/noose/sqlite.rs +++ b/src/noose/sqlite.rs @@ -198,9 +198,7 @@ pub struct NostrSqlite { impl NostrSqlite { pub async fn new(config: Arc) -> Self { - let env_db_path = std::env::var("DATABASE_URL").unwrap_or("/tmp/sqlite.db".to_string()); - - let cfg = Config::new(env_db_path); + let cfg = Config::new(config.get_db_path()); let pool = cfg.create_pool(Runtime::Tokio1).unwrap(); if NostrSqlite::run_migrations(&pool).await {