MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / createAuditAction

Function createAuditAction

packages/web/src/ee/features/audit/actions.ts:16–25  ·  view source on GitHub ↗
(event: Omit<AuditEvent, 'sourcebotVersion' | 'orgId' | 'actor' | 'target'>)

Source from the content-addressed store, hash-verified

14const logger = createLogger('audit-utils');
15
16export const createAuditAction = async (event: Omit<AuditEvent, 'sourcebotVersion' | 'orgId' | 'actor' | 'target'>) => sew(async () =>
17 withAuth(async ({ user, org }) => {
18 await createAudit({
19 ...event,
20 orgId: org.id,
21 actor: { id: user.id, type: "user" },
22 target: { id: org.id.toString(), type: "org" },
23 })
24 })
25);
26
27export interface FetchAuditRecordsParams {
28 skip: number;

Callers 1

SymbolHoverPopupFunction · 0.90

Calls 3

sewFunction · 0.90
withAuthFunction · 0.90
createAuditFunction · 0.90

Tested by

no test coverage detected