From 6ff44db18951b4c35747e86b1d9d8ade2a11cd2c Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 21 Dec 2024 22:13:56 -0800 Subject: [PATCH] update script policy --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index bcffc4f..4c324c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,7 @@ enum ReviewError{ ReadCurrent(std::io::Error), DeduplicateModified(submissions_api::types::SingleItemError), UploadModified(submissions_api::Error), + UpdateScriptPolicy(submissions_api::Error), } struct ReviewConfig{ @@ -145,6 +146,12 @@ async fn review(config:ReviewConfig)->Result<(),ReviewError>{ }; // update policy + api.update_script_policy(submissions_api::types::UpdateScriptPolicyRequest{ + ScriptPolicyID:unreviewed_policy.ID, + FromScriptID:None, + ToScriptID:to_script_id, + Policy:Some(reviewed_policy), + }).await.map_err(ReviewError::UpdateScriptPolicy)?; } Ok(())