fix: 修复 Rust OnlyOffice 附件打开链路
This commit is contained in:
@@ -332,6 +332,29 @@ pub async fn execute_sidebar_dataset_query(
|
||||
execute_convex_query_plan(config, context, plan).await
|
||||
}
|
||||
|
||||
pub async fn execute_convex_query_by_name(
|
||||
config: &AppConfig,
|
||||
context: &RequestContext,
|
||||
function_name: &str,
|
||||
args: Value,
|
||||
workspace_id: Option<&str>,
|
||||
error_phase: &'static str,
|
||||
) -> Result<Value, WebError> {
|
||||
let plan = RuntimeQueryExecutionPlan {
|
||||
query_name: function_name.to_string(),
|
||||
function_name: function_name.to_string(),
|
||||
workspace_id: workspace_id.map(ToOwned::to_owned),
|
||||
request_id: context.trace.request_id.clone(),
|
||||
trace_id: context.trace.trace_id.clone(),
|
||||
actor_id: context.auth.actor_id.clone(),
|
||||
payload_json: args.to_string(),
|
||||
args_json: args,
|
||||
};
|
||||
execute_convex_query_plan(config, context, &plan)
|
||||
.await
|
||||
.map_err(|error| error.with_header("x-error-phase", error_phase))
|
||||
}
|
||||
|
||||
fn convex_command_args_for_plan(plan: &RuntimeCommandExecutionPlan) -> Value {
|
||||
let mut args = plan.args_json.clone();
|
||||
if matches!(
|
||||
|
||||
Reference in New Issue
Block a user