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(())