mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 02:35:58 +03:00
Add support for adding and viewing of org ciphers
This commit is contained in:
@@ -229,12 +229,12 @@ struct OrgIdData {
|
||||
|
||||
#[get("/ciphers/organization-details?<data>")]
|
||||
fn get_org_details(data: OrgIdData, headers: Headers, conn: DbConn) -> JsonResult {
|
||||
|
||||
// Get list of ciphers in org?
|
||||
let ciphers = Cipher::find_by_org(&data.organizationId, &conn);
|
||||
let ciphers_json: Vec<Value> = ciphers.iter().map(|c| c.to_json(&headers.host, &conn)).collect();
|
||||
|
||||
Ok(Json(json!({
|
||||
"Data": [],
|
||||
"Object": "list"
|
||||
"Data": ciphers_json,
|
||||
"Object": "list",
|
||||
})))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user