From 42c082085cfd7238c7ab87e5bd06b9e52a698a71 Mon Sep 17 00:00:00 2001 From: fx Date: Sat, 21 Oct 2023 21:47:16 +0200 Subject: fixed move of init_db_pool --- src/db.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/db.rs b/src/db.rs index 295780e..3c51e2b 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1,9 +1,13 @@ +#[cfg(debug_assertions)] use std::env; use serde::Serialize; use sqlx::{PgPool, postgres::PgPoolOptions}; use tracing::{debug, info}; +#[cfg(not(debug_assertions))] +use crate::config::SETTINGS; + #[derive(Serialize)] pub struct Device { pub id: String, -- cgit v1.2.3