Logging und sowas

This commit is contained in:
Bastian Wagner
2026-02-20 10:28:48 +01:00
parent 29bfffc505
commit 4e051a1f40
14 changed files with 87 additions and 22 deletions

View File

@@ -14,6 +14,17 @@ export class ActivityHelperService {
private readonly cylinderRepo: CylinderRepository,
) {}
async logSystemRenamed({system, newName, user}: { system: KeySystem, newName: string, user: User}) {
let msg = `Schließanlage von ${system.name} zu ${newName} umbenannt`;
return this.activityRepo.save(
this.activityRepo.create({
system,
user,
message: msg,
}))
}
async logDeleteKey(user: User, key: Key, system?: KeySystem) {
if (!key || !user) { return; }