monitor-ai/src/lib/audit.ts

9 lines
356 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// src/lib/audit.ts — 审计日志封装(引用 @shared/lib/audit
import { writeAuditLog as writeLog, type AuditLogEntry } from '@shared/lib/audit/write-audit-log'
import { dbExec } from './db'
// 封装版:直接传入参数,自动处理 dbExec
export function writeAuditLog(entry: AuditLogEntry): void {
writeLog({ exec: dbExec }, entry)
}