diff --git a/src/features/dashboard/components/RecentActivity.tsx b/src/features/dashboard/components/RecentActivity.tsx index 174bd93..139fd93 100644 --- a/src/features/dashboard/components/RecentActivity.tsx +++ b/src/features/dashboard/components/RecentActivity.tsx @@ -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); } diff --git a/src/pages/superadmin/TenantDetails.tsx b/src/pages/superadmin/TenantDetails.tsx index 4d775ef..4922d20 100644 --- a/src/pages/superadmin/TenantDetails.tsx +++ b/src/pages/superadmin/TenantDetails.tsx @@ -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);