diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index ba24847f..007d8a37 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -702,7 +702,7 @@ async fn put_collections_update( headers: Headers, conn: DbConn, nt: Notify<'_>, -) -> EmptyResult { +) -> JsonResult { post_collections_update(uuid, data, headers, conn, nt).await } @@ -713,7 +713,7 @@ async fn post_collections_update( headers: Headers, mut conn: DbConn, nt: Notify<'_>, -) -> EmptyResult { +) -> JsonResult { let data: CollectionsAdminData = data.into_inner(); let cipher = match Cipher::find_by_uuid(uuid, &mut conn).await { @@ -761,7 +761,7 @@ async fn post_collections_update( log_event( EventType::CipherUpdatedCollections as i32, &cipher.uuid, - &cipher.organization_uuid.unwrap(), + &cipher.organization_uuid.clone().unwrap(), &headers.user.uuid, headers.device.atype, &headers.ip.ip, @@ -769,7 +769,7 @@ async fn post_collections_update( ) .await; - Ok(()) + Ok(Json(cipher.to_json(&headers.host, &headers.user.uuid, None, CipherSyncType::User, &mut conn).await)) } #[put("/ciphers//collections-admin", data = "")]