pub async fn record(
conn: &mut PgConnection,
actor: Option<&Actor>,
action: &str,
entity_type: &str,
entity_id: Option<Uuid>,
summary: impl Into<String>,
details: Value,
) -> AppResult<()>Expand description
Writes an audit entry. Call it inside the transaction of the change it documents, so that both are committed (or rolled back) together.