refactor: purge Node.js, Rust is the one true backend

- Moved boosapi-rs/* to repo root
- Deleted all Node.js source (src/server/, src/web/, scripts/)
- Deleted node_modules, package.json, tsconfig, vite.config
- Updated .gitignore and AGENTS.md for Rust-only stack
- Fixed static file path for frontend dist/web/
- Dockerfile stays the same (already Rust-only)
- Kept dist/web/ for Rust static serving
This commit is contained in:
boos
2026-05-18 09:11:29 +08:00
parent 725f44699a
commit 5d29f03d50
1165 changed files with 271 additions and 323571 deletions
+22
View File
@@ -0,0 +1,22 @@
use serde_json::Value;
pub fn string_field<'a>(body: &'a Value, key: &str) -> Option<&'a str> {
body.get(key).and_then(Value::as_str)
}
pub fn bool_field(body: &Value, key: &str) -> Option<bool> {
body.get(key).and_then(Value::as_bool)
}
pub fn array_field<'a>(body: &'a Value, key: &str) -> Option<&'a Vec<Value>> {
body.get(key).and_then(Value::as_array)
}
pub fn merge_json_object(base: &mut Value, extra: Value) {
let (Some(base), Some(extra)) = (base.as_object_mut(), extra.as_object()) else {
return;
};
for (key, value) in extra {
base.insert(key.clone(), value.clone());
}
}