260224:1606 20260224:1600 V1.8.0
All checks were successful
Build and Deploy / deploy (push) Successful in 6m25s

This commit is contained in:
admin
2026-02-24 16:06:15 +07:00
parent 97cc41f489
commit 158179d4a5
255 changed files with 5339 additions and 2094 deletions

View File

@@ -1,4 +1,5 @@
import apiClient from "@/lib/api/client";
import { AuditQueryParams } from '@/types/dto/numbering.dto';
export interface AuditLog {
auditId: string;
@@ -12,16 +13,18 @@ export interface AuditLog {
severity: string;
entityType?: string;
entityId?: string;
detailsJson?: any;
detailsJson?: Record<string, unknown>;
ipAddress?: string;
userAgent?: string;
createdAt: string;
}
export type AuditLogQueryParams = AuditQueryParams;
export const auditLogService = {
getLogs: async (params?: any) => {
const response = await apiClient.get<any>("/audit-logs", { params });
getLogs: async (params?: AuditLogQueryParams) => {
const response = await apiClient.get<{ data: AuditLog[] } | AuditLog[]>("/audit-logs", { params });
// Support both wrapped and unwrapped scenarios
return response.data.data || response.data;
return (response.data as { data: AuditLog[] }).data ?? response.data;
},
};