uploading levels i think

This commit is contained in:
Reid 2023-09-04 19:51:37 -07:00
parent dfcd9e8921
commit ac8a121a8c
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
9 changed files with 167 additions and 9 deletions

View file

@ -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:");