refactor: update auditLogService.getAll calls to use object-based filter parameters

This commit is contained in:
Yashwin 2026-04-03 14:16:51 +05:30
parent 040d710ec7
commit 682c390220
2 changed files with 3 additions and 4 deletions

View File

@ -50,7 +50,7 @@ export const RecentActivity = ({ variant }: RecentActivityProps) => {
setIsLoading(true); setIsLoading(true);
// Pass tenantId if we're on a tenant route to get tenant-specific logs // Pass tenantId if we're on a tenant route to get tenant-specific logs
const filterTenantId = window.location.pathname.startsWith('/tenant') ? tenantId : null; const filterTenantId = window.location.pathname.startsWith('/tenant') ? tenantId : null;
const response = await auditLogService.getAll(1, 5, null, ['created_at', 'desc'], filterTenantId); const response = await auditLogService.getAll(1, 5, { tenant_id: filterTenantId }, ['created_at', 'desc']);
if (response.success) { if (response.success) {
setAuditLogs(response.data); setAuditLogs(response.data);
} }

View File

@ -173,9 +173,8 @@ const TenantDetails = (): ReactElement => {
const response = await auditLogService.getAll( const response = await auditLogService.getAll(
auditLogsPage, auditLogsPage,
auditLogsLimit, auditLogsLimit,
null, { tenant_id: id },
null, ["created_at", "DESC"]
id,
); );
if (response.success) { if (response.success) {
setAuditLogs(response.data); setAuditLogs(response.data);