MCPcopy
hub / github.com/msgbyte/tianji / createAuditLog

Function createAuditLog

src/server/model/auditLog.ts:7–24  ·  view source on GitHub ↗
(info: {
  workspaceId: string;
  relatedId?: string;
  relatedType?: WorkspaceAuditLogType;
  content: string;
})

Source from the content-addressed store, hash-verified

5 * create audit log which can query by log
6 */
7export async function createAuditLog(info: {
8 workspaceId: string;
9 relatedId?: string;
10 relatedType?: WorkspaceAuditLogType;
11 content: string;
12}) {
13 try {
14 const log = await prisma.workspaceAuditLog.create({
15 data: {
16 ...info,
17 },
18 });
19
20 return log;
21 } catch (err) {
22 console.error('[AuditLog] create log error', String(err));
23 }
24}

Callers 12

requestOpenAIFunction · 0.85
runTaskFunction · 0.85
runWorkerMethod · 0.85
startCronMethod · 0.85
runMonitorMethod · 0.85
runMethod · 0.85
ai.tsFile · 0.85
shortlink.tsFile · 0.85
workspace.tsFile · 0.85
user.tsFile · 0.85
worker.tsFile · 0.85
monitor.tsFile · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected