summaryrefslogtreecommitdiff
path: root/makima/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/bin')
-rw-r--r--makima/src/bin/makima.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/makima/src/bin/makima.rs b/makima/src/bin/makima.rs
index 92fdae6..8115387 100644
--- a/makima/src/bin/makima.rs
+++ b/makima/src/bin/makima.rs
@@ -787,6 +787,16 @@ async fn run_directive(
.await?;
println!("{}", serde_json::to_string(&result.0)?);
}
+ DirectiveCommand::SubmitPlan(args) => {
+ let client = ApiClient::new(args.api_url, args.api_key)?;
+ // Read plan JSON from stdin
+ let mut plan_json = String::new();
+ io::stdin().read_to_string(&mut plan_json)?;
+ let result = client
+ .directive_submit_plan(args.directive_id, &plan_json)
+ .await?;
+ println!("{}", serde_json::to_string(&result.0)?);
+ }
}
Ok(())