From 493bfa4ad667ea68c764aee4f1359dbb02f1dc4c Mon Sep 17 00:00:00 2001 From: ZzIsGod1019 <1498852723@qq.com> Date: Mon, 1 Apr 2024 14:58:22 +0800 Subject: [PATCH] flow: Completion of init api (#677) * flow: fix error * flow: Completion of init api --- middleware/flow/src/flow_initializer.rs | 4 +++- middleware/flow/src/serv/flow_inst_serv.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/middleware/flow/src/flow_initializer.rs b/middleware/flow/src/flow_initializer.rs index 68b5ee896..474bfbb19 100644 --- a/middleware/flow/src/flow_initializer.rs +++ b/middleware/flow/src/flow_initializer.rs @@ -18,7 +18,7 @@ use tardis::{ use crate::{ api::{ cc::{flow_cc_inst_api, flow_cc_model_api, flow_cc_state_api}, - ci::flow_ci_inst_api, + ci::{flow_ci_inst_api, flow_ci_model_api, flow_ci_state_api}, cs::flow_cs_config_api, }, domain::{flow_inst, flow_model, flow_state, flow_transition}, @@ -49,6 +49,8 @@ async fn init_api(web_server: &TardisWebServer) -> TardisResult<()> { flow_cc_inst_api::FlowCcInstApi, flow_cs_config_api::FlowCsConfigApi, flow_ci_inst_api::FlowCiInstApi, + flow_ci_model_api::FlowCiModelApi, + flow_ci_state_api::FlowCiStateApi, ), ) .await; diff --git a/middleware/flow/src/serv/flow_inst_serv.rs b/middleware/flow/src/serv/flow_inst_serv.rs index 0d507b399..cfee3a658 100644 --- a/middleware/flow/src/serv/flow_inst_serv.rs +++ b/middleware/flow/src/serv/flow_inst_serv.rs @@ -1042,7 +1042,7 @@ impl FlowInstServ { } } crate::dto::flow_var_dto::DefaultValueType::AutoFill => { - match FillType::from_str(&default.value.as_str().ok_or(funs.err().bad_request( + match FillType::from_str(default.value.as_str().ok_or(funs.err().bad_request( "flow_transitions", "default_value_type_parse", "AutoFill default value type is not string",