Also add ability to externally set new_user

This commit is contained in:
Ethan O'Brien
2026-05-10 17:10:28 -05:00
parent e9c84be5fa
commit 982e8ba70e

View File

@@ -13,7 +13,10 @@ use crate::include_file;
lazy_static! {
static ref DATABASE: SQLite = SQLite::new("userdata.db", setup_tables);
static ref NEW_USER: JsonValue = {
jzon::parse(&include_file!("src/router/userdata/new_user.json")).unwrap()
let raw = crate::runtime::read_masterdata_file("userdata/new_user.json")
.and_then(|b| String::from_utf8(b).ok())
.unwrap_or_else(|| include_file!("src/router/userdata/new_user.json"));
jzon::parse(&raw).unwrap()
};
}