mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 18:55:57 +03:00
Updated Organizations overview
- Changed HTML to match users overview - Added User count - Added Org cipher amount - Added Attachment count and size
This commit is contained in:
@@ -150,4 +150,14 @@ impl Attachment {
|
||||
|
||||
result.unwrap_or(0)
|
||||
}
|
||||
|
||||
pub fn count_by_org(org_uuid: &str, conn: &DbConn) -> i64 {
|
||||
attachments::table
|
||||
.left_join(ciphers::table.on(ciphers::uuid.eq(attachments::cipher_uuid)))
|
||||
.filter(ciphers::organization_uuid.eq(org_uuid))
|
||||
.count()
|
||||
.first(&**conn)
|
||||
.ok()
|
||||
.unwrap_or(0)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user