|
|
@ -76,6 +76,11 @@ fn get_cipher_admin(uuid: String, headers: Headers, conn: DbConn) -> JsonResult
|
|
|
|
get_cipher(uuid, headers, conn)
|
|
|
|
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)]
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
struct CipherData {
|
|
|
|
struct CipherData {
|
|
|
@ -306,6 +311,11 @@ struct CollectionsAdminData {
|
|
|
|
collectionIds: Vec<String>,
|
|
|
|
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>")]
|
|
|
|
#[post("/ciphers/<uuid>/collections-admin", data = "<data>")]
|
|
|
|
fn post_collections_admin(uuid: String, data: Json<CollectionsAdminData>, headers: Headers, conn: DbConn) -> EmptyResult {
|
|
|
|
fn post_collections_admin(uuid: String, data: Json<CollectionsAdminData>, headers: Headers, conn: DbConn) -> EmptyResult {
|
|
|
|
let data: CollectionsAdminData = data.into_inner();
|
|
|
|
let data: CollectionsAdminData = data.into_inner();
|
|
|
|