treewide: fix various UI bugs; optimize crypto dependencies & format
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: If8fe8b38c1d9c4fecd40ff71f88d2ae06a6a6964
This commit is contained in:
parent
764aafa88d
commit
3ccddce7fd
178 changed files with 58342 additions and 54241 deletions
|
|
@ -1,21 +1,23 @@
|
|||
use uuid::Uuid;
|
||||
|
||||
use crate::error::Result;
|
||||
use crate::model::{AuditAction, AuditEntry, MediaId};
|
||||
use crate::storage::DynStorageBackend;
|
||||
use crate::{
|
||||
error::Result,
|
||||
model::{AuditAction, AuditEntry, MediaId},
|
||||
storage::DynStorageBackend,
|
||||
};
|
||||
|
||||
pub async fn record_action(
|
||||
storage: &DynStorageBackend,
|
||||
media_id: Option<MediaId>,
|
||||
action: AuditAction,
|
||||
details: Option<String>,
|
||||
storage: &DynStorageBackend,
|
||||
media_id: Option<MediaId>,
|
||||
action: AuditAction,
|
||||
details: Option<String>,
|
||||
) -> Result<()> {
|
||||
let entry = AuditEntry {
|
||||
id: Uuid::now_v7(),
|
||||
media_id,
|
||||
action,
|
||||
details,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
storage.record_audit(&entry).await
|
||||
let entry = AuditEntry {
|
||||
id: Uuid::now_v7(),
|
||||
media_id,
|
||||
action,
|
||||
details,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
storage.record_audit(&entry).await
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue