Skip to content

Commit

Permalink
return cipherDetails on post_collections_update()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan0xC committed Jun 24, 2024
1 parent e97088c commit 9af6f86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/core/ciphers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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 {
Expand Down Expand Up @@ -761,15 +761,15 @@ 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,
&mut conn,
)
.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>")]
Expand Down

0 comments on commit 9af6f86

Please sign in to comment.