21 lines
538 B
TypeScript
21 lines
538 B
TypeScript
import { fetchJson } from "@/lib/client/fetch-json";
|
|
|
|
export type GroupAuditEvent = {
|
|
id: number;
|
|
groupId: number;
|
|
actorUserId: number | null;
|
|
actorRole: string | null;
|
|
eventType: string;
|
|
requestId: string;
|
|
ip: string | null;
|
|
userAgent: string | null;
|
|
success: boolean;
|
|
errorCode: string | null;
|
|
metadata: Record<string, unknown>;
|
|
createdAt: string;
|
|
};
|
|
|
|
export async function groupAuditList() {
|
|
return fetchJson<{ events: GroupAuditEvent[] }>("/api/groups/audit", { method: "GET" });
|
|
}
|