fix api
This commit is contained in:
parent
56fefbe52d
commit
1133e00ccc
@ -43,8 +43,8 @@ pub struct ScriptPolicyHashRequest{
|
|||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
pub struct ScriptPolicyResponse{
|
pub struct ScriptPolicyResponse{
|
||||||
pub ID:i64,
|
pub ID:i64,
|
||||||
pub Hash:String,
|
pub FromScriptHash:String,
|
||||||
pub ScriptID:ScriptID,
|
pub ToScriptID:ScriptID,
|
||||||
pub Policy:Policy
|
pub Policy:Policy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ impl Validator{
|
|||||||
api::Policy::Delete=>Policy::Delete,
|
api::Policy::Delete=>Policy::Delete,
|
||||||
api::Policy::Replace=>{
|
api::Policy::Replace=>{
|
||||||
let script=self.api.get_script(api::GetScriptRequest{
|
let script=self.api.get_script(api::GetScriptRequest{
|
||||||
ScriptID:script_policy.ScriptID,
|
ScriptID:script_policy.ToScriptID,
|
||||||
}).await.map_err(ValidateError::ApiGetScript)?;
|
}).await.map_err(ValidateError::ApiGetScript)?;
|
||||||
Policy::Replace(script.Source)
|
Policy::Replace(script.Source)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user