Files
lcbp3/frontend/hooks/use-audit-logs.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

15 lines
446 B
TypeScript

import { useQuery } from '@tanstack/react-query';
import { auditLogService, AuditLog } from '@/lib/services/audit-log.service';
export const auditLogKeys = {
all: ['audit-logs'] as const,
list: (params: any) => [...auditLogKeys.all, 'list', params] as const,
};
export function useAuditLogs(params?: any) {
return useQuery<AuditLog[]>({
queryKey: auditLogKeys.list(params),
queryFn: () => auditLogService.getLogs(params),
});
}