Fix PatchOp::change API (#4616)

This commit is contained in:
Rushmore Mushambi 2024-08-27 13:24:22 +01:00 committed by GitHub
parent 4775bf6b08
commit 9ca3a4d087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
})) }))
} }
} }