Files
lcbp3/frontend/lib/services/audit-log.service.ts
admin aa96cd90e3
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled
251209:1453 Frontend: progress nest = UAT & Bug Fixing
2025-12-09 14:53:42 +07:00

28 lines
652 B
TypeScript

import apiClient from "@/lib/api/client";
export interface AuditLog {
auditId: string;
userId?: number | null;
user?: {
id: number;
fullName?: string;
username: string;
};
action: string;
severity: string;
entityType?: string;
entityId?: string;
detailsJson?: any;
ipAddress?: string;
userAgent?: string;
createdAt: string;
}
export const auditLogService = {
getLogs: async (params?: any) => {
const response = await apiClient.get<any>("/audit-logs", { params });
// Support both wrapped and unwrapped scenarios
return response.data.data || response.data;
},
};