mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 01:01:25 +10:00
Fixed bug with bad initial loading into store instead of auth
This commit is contained in:
@ -41,9 +41,12 @@ pub struct Database {
|
||||
pub base_url: String,
|
||||
pub games: DatabaseGames,
|
||||
}
|
||||
pub static DATA_ROOT_DIR: LazyLock<PathBuf> =
|
||||
LazyLock::new(|| BaseDirs::new().unwrap().data_dir().join("drop"));
|
||||
|
||||
pub type DatabaseInterface =
|
||||
rustbreak::Database<Database, rustbreak::backend::PathBackend, Bincode>;
|
||||
|
||||
pub trait DatabaseImpls {
|
||||
fn set_up_database() -> DatabaseInterface;
|
||||
fn database_is_set_up(&self) -> bool;
|
||||
@ -82,6 +85,4 @@ impl DatabaseImpls for DatabaseInterface {
|
||||
let handle = self.borrow_data().unwrap();
|
||||
Url::parse(&handle.base_url).unwrap()
|
||||
}
|
||||
}
|
||||
pub static DATA_ROOT_DIR: LazyLock<PathBuf> =
|
||||
LazyLock::new(|| BaseDirs::new().unwrap().data_dir().join("drop"));
|
||||
}
|
||||
Reference in New Issue
Block a user