Use db-path from Config
This commit is contained in:
parent
df15dba3cc
commit
9f29f6cd07
|
@ -198,9 +198,7 @@ pub struct NostrSqlite {
|
|||
|
||||
impl NostrSqlite {
|
||||
pub async fn new(config: Arc<ServiceConfig>) -> 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 {
|
||||
|
|
Loading…
Reference in a new issue