mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-07-12 08:42:20 +08:00
Also add ability to externally set new_user
This commit is contained in:
@@ -13,7 +13,10 @@ use crate::include_file;
|
|||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref DATABASE: SQLite = SQLite::new("userdata.db", setup_tables);
|
static ref DATABASE: SQLite = SQLite::new("userdata.db", setup_tables);
|
||||||
static ref NEW_USER: JsonValue = {
|
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()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user