From 1133e00cccf5b4a3c8ea11b1fcdba698714bc0e6 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 6 Dec 2024 19:02:57 -0800 Subject: [PATCH] fix api --- validation/api/src/lib.rs | 4 ++-- validation/src/validator.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/validation/api/src/lib.rs b/validation/api/src/lib.rs index 4818124..88e16e3 100644 --- a/validation/api/src/lib.rs +++ b/validation/api/src/lib.rs @@ -43,8 +43,8 @@ pub struct ScriptPolicyHashRequest{ #[derive(serde::Deserialize)] pub struct ScriptPolicyResponse{ pub ID:i64, - pub Hash:String, - pub ScriptID:ScriptID, + pub FromScriptHash:String, + pub ToScriptID:ScriptID, pub Policy:Policy } diff --git a/validation/src/validator.rs b/validation/src/validator.rs index 258c853..155ad04 100644 --- a/validation/src/validator.rs +++ b/validation/src/validator.rs @@ -122,7 +122,7 @@ impl Validator{ api::Policy::Delete=>Policy::Delete, api::Policy::Replace=>{ let script=self.api.get_script(api::GetScriptRequest{ - ScriptID:script_policy.ScriptID, + ScriptID:script_policy.ToScriptID, }).await.map_err(ValidateError::ApiGetScript)?; Policy::Replace(script.Source) },