1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-22 05:10:29 +01:00

Support editing collections from user vault

Dieser Commit ist enthalten in:
Miroslav Prasil 2018-05-17 23:03:08 +01:00
Ursprung 9273c38b69
Commit 2215bdf018
2 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -76,6 +76,11 @@ fn get_cipher_admin(uuid: String, headers: Headers, conn: DbConn) -> JsonResult
get_cipher(uuid, headers, conn)
}
#[get("/ciphers/<uuid>/details")]
fn get_cipher_details(uuid: String, headers: Headers, conn: DbConn) -> JsonResult {
get_cipher(uuid, headers, conn)
}
#[derive(Deserialize, Debug)]
#[allow(non_snake_case)]
struct CipherData {
@ -305,6 +310,11 @@ struct CollectionsAdminData {
collectionIds: Vec<String>,
}
#[post("/ciphers/<uuid>/collections", data = "<data>")]
fn post_collections_update(uuid: String, data: Json<CollectionsAdminData>, headers: Headers, conn: DbConn) -> EmptyResult {
post_collections_admin(uuid, data, headers, conn)
}
#[post("/ciphers/<uuid>/collections-admin", data = "<data>")]
fn post_collections_admin(uuid: String, data: Json<CollectionsAdminData>, headers: Headers, conn: DbConn) -> EmptyResult {
let data: CollectionsAdminData = data.into_inner();

Datei anzeigen

@ -27,6 +27,7 @@ pub fn routes() -> Vec<Route> {
get_ciphers,
get_cipher,
get_cipher_admin,
get_cipher_details,
post_ciphers,
post_ciphers_admin,
post_ciphers_import,
@ -69,6 +70,7 @@ pub fn routes() -> Vec<Route> {
post_organization_collections,
post_organization_collection_update,
post_organization_collection_delete,
post_collections_update,
post_collections_admin,
get_org_details,
get_org_users,