mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 12:13:27 +00:00
fix doAdd cloud api and provide operations count (#2154)
This commit is contained in:
parent
8e271c007f
commit
54af5a822f
|
@ -66,6 +66,8 @@ pub async fn run_actor(
|
|||
let start_time = ops[0].timestamp.0.to_string();
|
||||
let end_time = ops[ops.len() - 1].timestamp.0.to_string();
|
||||
|
||||
let ops_len = ops.len();
|
||||
|
||||
instances.push(do_add::Input {
|
||||
uuid: req_add.instance_uuid,
|
||||
key: req_add.key,
|
||||
|
@ -73,6 +75,7 @@ pub async fn run_actor(
|
|||
end_time,
|
||||
contents: serde_json::to_value(CompressedCRDTOperations::new(ops))
|
||||
.expect("CompressedCRDTOperation should serialize!"),
|
||||
ops_count: ops_len,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -451,6 +451,7 @@ pub mod library {
|
|||
pub start_time: String,
|
||||
pub end_time: String,
|
||||
pub contents: serde_json::Value,
|
||||
pub ops_count: usize,
|
||||
}
|
||||
|
||||
pub async fn exec(
|
||||
|
@ -465,7 +466,7 @@ pub mod library {
|
|||
config
|
||||
.client
|
||||
.post(&format!(
|
||||
"{}/api/v1/libraries/{}/messageCollections/requestAdd",
|
||||
"{}/api/v1/libraries/{}/messageCollections/doAdd",
|
||||
config.api_url, library_id
|
||||
))
|
||||
.json(&json!({ "instances": instances }))
|
||||
|
|
Loading…
Reference in a new issue