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);
// Pass tenantId if we're on a tenant route to get tenant-specific logs
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) {
setAuditLogs(response.data);
}

View File

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