fixed jspg_schemas returning a drop now

This commit is contained in:
2026-03-16 00:19:32 -04:00
parent 6444b300b3
commit 3bec6a6102
2 changed files with 16 additions and 11 deletions

View File

@ -121,9 +121,10 @@ pub fn jspg_schemas() -> JsonB {
Some(engine) => {
let schemas_json = serde_json::to_value(&engine.database.schemas)
.unwrap_or(serde_json::Value::Object(serde_json::Map::new()));
JsonB(schemas_json)
let drop = crate::drop::Drop::success_with_val(schemas_json);
JsonB(serde_json::to_value(drop).unwrap())
}
None => JsonB(serde_json::Value::Object(serde_json::Map::new())),
None => jspg_failure(),
}
}
@ -138,9 +139,10 @@ pub fn jspg_stems() -> JsonB {
Some(engine) => {
let stems_json = serde_json::to_value(&engine.database.stems)
.unwrap_or(serde_json::Value::Object(serde_json::Map::new()));
JsonB(stems_json)
let drop = crate::drop::Drop::success_with_val(stems_json);
JsonB(serde_json::to_value(drop).unwrap())
}
None => JsonB(serde_json::Value::Object(serde_json::Map::new())),
None => jspg_failure(),
}
}