uploading levels i think
This commit is contained in:
parent
dfcd9e8921
commit
ac8a121a8c
9 changed files with 167 additions and 9 deletions
|
@ -5,7 +5,8 @@ use std::sync::LazyLock;
|
|||
#[derive(Deserialize)]
|
||||
pub struct Config {
|
||||
pub general: ConfigGeneral,
|
||||
pub accounts: ConfigAccounts
|
||||
pub accounts: ConfigAccounts,
|
||||
pub db: ConfigDB
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
@ -19,6 +20,11 @@ pub struct ConfigAccounts {
|
|||
pub allow_registration: bool
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ConfigDB {
|
||||
pub data_folder: String
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn load_from_file(file_path: &str) -> Self {
|
||||
let toml_str = fs::read_to_string(file_path).expect("Error finding toml config:");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue