From 64ef9fcc4180250759dd040a5c8eb5602e91a821 Mon Sep 17 00:00:00 2001 From: bitful-pannul Date: Thu, 19 Oct 2023 02:05:16 +0200 Subject: [PATCH] convert chess tesst --- modules/chess/src/lib.rs | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/modules/chess/src/lib.rs b/modules/chess/src/lib.rs index 4802d5f5..94927cd5 100644 --- a/modules/chess/src/lib.rs +++ b/modules/chess/src/lib.rs @@ -177,7 +177,7 @@ impl Guest for Component { let bindings_address = Address { node: our.node.clone(), - process: ProcessId::from_str("http_bindings:http_bindings:uqbar").unwrap(), + process: ProcessId::from_str("http_server:server:uqbar").unwrap(), }; // , option> @@ -188,15 +188,13 @@ impl Guest for Component { Request { inherit: false, expects_response: None, - ipc: Some( - serde_json::json!({ - "action": "bind-app", + ipc: Some(json!({ + "BindPath": { "path": "/chess", - "app": "chess", "authenticated": true, - }) - .to_string(), - ), + "local_only": false + } + }).to_string()), metadata: None, }, None, @@ -207,15 +205,13 @@ impl Guest for Component { Request { inherit: false, expects_response: None, - ipc: Some( - serde_json::json!({ - "action": "bind-app", + ipc: Some(json!({ + "BindPath": { "path": "/chess/games", - "app": "chess", "authenticated": true, - }) - .to_string(), - ), + "local_only": false + } + }).to_string()), metadata: None, }, None, @@ -479,7 +475,7 @@ impl Guest for Component { continue; } } - } else if source.process.to_string() == "http_bindings:http_bindings:uqbar" { + } else if source.process.to_string() == "http_server:sys:uqbar" { let path = message_json["path"].as_str().unwrap_or(""); let method = message_json["method"].as_str().unwrap_or("");