Files
vps-tracker/apps/api/src/services/audit.ts
T
DenozordecandCursor 11b67a1cef
Docker / build (push) Has been cancelled
feat: расширить инвентарь, ops и интеграции по roadmap
Добавлены bulk-операции VPS, карточка /vps/:id, CRUD проектов, Command Palette,
календарь продлений, webhooks, uptime-проверки, audit log, кастомные поля и адаптеры провайдеров.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 15:28:35 +07:00

14 lines
581 B
TypeScript

import { auditLogRepository } from '@cfdm/db/repositories/audit-log'
export function auditCreate(entity: string, entityId: string, data?: Record<string, unknown>): void {
auditLogRepository.append({ entity, entityId, action: 'create', diff: data })
}
export function auditUpdate(entity: string, entityId: string, patch: Record<string, unknown>): void {
auditLogRepository.append({ entity, entityId, action: 'update', diff: patch })
}
export function auditDelete(entity: string, entityId: string): void {
auditLogRepository.append({ entity, entityId, action: 'delete' })
}