feat: add some shit

This commit is contained in:
2024-03-05 18:19:29 +01:00
parent 738bc1cf7a
commit b54370bec0
4 changed files with 72 additions and 8 deletions

View File

@ -17,7 +17,13 @@ async fn get_node(req: Request<()>) -> tide::Result {
let node_registry = NodeRegistryCore::new("../../target/wasm32-unknown-unknown/release");
if node_id.ends_with(".json") {
Ok("asd".into())
let res =
node_registry.get_node_definition(author, namespace, &node_id.replace(".json", ""));
match res {
Ok(res) => Ok(format!("Hello {}", res).into()),
Err(er) => Ok(format!("Err: {}", er).into()),
}
} else {
let res = node_registry.get_node(author, namespace, node_id);