Browse Source

return cipherDetails on post_collections_update()

pull/4592/head
Stefan Melmuk 11 months ago
parent
commit
9af6f864df
No known key found for this signature in database GPG Key ID: 817020C608FE9C09
  1. 8
      src/api/core/ciphers.rs

8
src/api/core/ciphers.rs

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

Loading…
Cancel
Save