make all frontend functions works (#466)

This commit is contained in:
Sijie.Sun
2024-11-10 11:06:58 +08:00
committed by GitHub
parent e948dbfcc1
commit 88e6de9d7e
36 changed files with 1039 additions and 483 deletions
+4 -1
View File
@@ -100,7 +100,10 @@ impl WebClientService for Controller {
_: BaseController,
req: RunNetworkInstanceRequest,
) -> Result<RunNetworkInstanceResponse, rpc_types::error::Error> {
let cfg = TomlConfigLoader::new_from_str(&req.config)?;
if req.config.is_none() {
return Err(anyhow::anyhow!("config is required").into());
}
let cfg = req.config.unwrap().gen_config()?;
let id = cfg.get_id();
if let Some(inst_id) = req.inst_id {
cfg.set_id(inst_id.into());