about summary refs log tree commit diff stats
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/app.rs b/src/app.rs
index 14b85a3..f956251 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -8,19 +8,17 @@
 // You should have received a copy of the License along with this program.
 // If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 
+use std::path::PathBuf;
+
 use anyhow::{Context, Result};
 use sqlx::{query, sqlite::SqliteConnectOptions, SqlitePool};
 
-use crate::constants;
-
 pub struct App {
     pub database: SqlitePool,
 }
 
 impl App {
-    pub async fn new() -> Result<Self> {
-        let db_name = constants::database()?;
-
+    pub async fn new(db_name: PathBuf) -> Result<Self> {
         let options = SqliteConnectOptions::new()
             .filename(db_name)
             .optimize_on_close(true, None)