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);
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user