Fix PatchOp::change
API (#4616)
This commit is contained in:
parent
4775bf6b08
commit
9ca3a4d087
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
//! The different options and types for use in API functions
|
//! The different options and types for use in API functions
|
||||||
use dmp::Diff;
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
pub mod auth;
|
pub mod auth;
|
||||||
|
@ -126,10 +126,10 @@ impl PatchOp {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Changes a value
|
/// Changes a value
|
||||||
pub fn change(path: &str, diff: Diff) -> Self {
|
pub fn change(path: &str, diff: String) -> Self {
|
||||||
Self(Serializer::new().serialize(UnitOp::Change {
|
Self(Serializer::new().serialize(UnitOp::Change {
|
||||||
path,
|
path,
|
||||||
value: diff.text,
|
value: diff,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue