refactor: update auditLogService.getAll calls to use object-based filter parameters
This commit is contained in:
parent
040d710ec7
commit
682c390220
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user