Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-07-04 13:14:42 +02:00
add collections_v2 endpoint
Dieser Commit ist enthalten in:
Ursprung
9af6f864df
Commit
a74c7bf20f
|
@ -79,6 +79,8 @@ pub fn routes() -> Vec<Route> {
|
||||||
delete_all,
|
delete_all,
|
||||||
move_cipher_selected,
|
move_cipher_selected,
|
||||||
move_cipher_selected_put,
|
move_cipher_selected_put,
|
||||||
|
put_collections2_update,
|
||||||
|
post_collections2_update,
|
||||||
put_collections_update,
|
put_collections_update,
|
||||||
post_collections_update,
|
post_collections_update,
|
||||||
post_collections_admin,
|
post_collections_admin,
|
||||||
|
@ -695,6 +697,33 @@ struct CollectionsAdminData {
|
||||||
collection_ids: Vec<String>,
|
collection_ids: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[put("/ciphers/<uuid>/collections_v2", data = "<data>")]
|
||||||
|
async fn put_collections2_update(
|
||||||
|
uuid: &str,
|
||||||
|
data: Json<CollectionsAdminData>,
|
||||||
|
headers: Headers,
|
||||||
|
conn: DbConn,
|
||||||
|
nt: Notify<'_>,
|
||||||
|
) -> JsonResult {
|
||||||
|
post_collections2_update(uuid, data, headers, conn, nt).await
|
||||||
|
}
|
||||||
|
|
||||||
|
#[post("/ciphers/<uuid>/collections_v2", data = "<data>")]
|
||||||
|
async fn post_collections2_update(
|
||||||
|
uuid: &str,
|
||||||
|
data: Json<CollectionsAdminData>,
|
||||||
|
headers: Headers,
|
||||||
|
conn: DbConn,
|
||||||
|
nt: Notify<'_>,
|
||||||
|
) -> JsonResult {
|
||||||
|
let cipher_details = post_collections_update(uuid, data, headers, conn, nt).await?;
|
||||||
|
Ok(Json(json!({ // AttachmentUploadDataResponseModel
|
||||||
|
"object": "optionalCipherDetails",
|
||||||
|
"unavailable": false,
|
||||||
|
"cipher": *cipher_details
|
||||||
|
})))
|
||||||
|
}
|
||||||
|
|
||||||
#[put("/ciphers/<uuid>/collections", data = "<data>")]
|
#[put("/ciphers/<uuid>/collections", data = "<data>")]
|
||||||
async fn put_collections_update(
|
async fn put_collections_update(
|
||||||
uuid: &str,
|
uuid: &str,
|
||||||
|
|
Laden …
In neuem Issue referenzieren