Make auditlog log

This commit is contained in:
Nadja Reitzenstein
2022-03-20 22:46:04 +01:00
parent c402c71abc
commit 3eab5b8702
6 changed files with 51 additions and 9 deletions

View File

@ -3,6 +3,7 @@ use lmdb::Environment;
use once_cell::sync::OnceCell;
use rkyv::{Archive, Deserialize, Infallible, Serialize};
use std::collections::HashMap;
use std::fmt::{Display, Formatter, Write};
use std::ops::Deref;
use std::path::Path;
use std::sync::Arc;
@ -41,6 +42,12 @@ impl PartialEq<UserRef> for ArchivedUserRef {
}
}
impl Display for ArchivedUserRef {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.write_str(self.id.as_str())
}
}
impl UserRef {
pub fn new(id: String) -> Self {
UserRef { id }