This commit is contained in:
jarek committed 2026-07-25 08:41:01 +02:00
1 parent 9f09d60a83
commit 64b6dcd744
177 files changed
+21182 -1042

No files matched your search

+54
View File
@@ -281,6 +281,24 @@ export async function auditRegistry(
});
}
/**
* Helper for backup destination actions
*/
export async function auditBackupDestination(
event: RequestEvent,
action: AuditAction,
destinationId: number,
destinationName: string,
details?: any
): Promise<void> {
await audit(event, action, 'backup_destination', {
entityId: String(destinationId),
entityName: destinationName,
description: `Backup destination ${destinationName} ${action}`,
details
});
}
/**
* Helper for git repository actions
*/
@@ -455,3 +473,39 @@ export async function auditAuth(
console.error('[Audit] Failed to log event:', errorMsg);
}
}
/**
* Helper for backup actions (backup run, cancel, config create/update/delete)
*/
export async function auditBackup(
event: RequestEvent,
action: AuditAction,
targetName: string,
environmentId?: number | null,
details?: any
): Promise<void> {
await audit(event, action, 'backup_config', {
entityName: targetName,
environmentId,
description: `Backup ${targetName} ${action}`,
details
});
}
/**
* Helper for restore actions
*/
export async function auditRestore(
event: RequestEvent,
targetName: string,
environmentId?: number | null,
details?: any
): Promise<void> {
await audit(event, 'restore', 'backup_config', {
entityName: targetName,
environmentId,
description: `Restore ${targetName}`,
details
});
}