fix: avoid multiple paginated queries in metrics
This commit is contained in:
parent
744dcd1895
commit
4c25f3f83e
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import {
|
|||
fetchOpenScopedTickets,
|
||||
fetchScopedTicketsByCreatedRange,
|
||||
fetchScopedTicketsByResolvedRange,
|
||||
fetchScopedTicketsByResolvedRangeSnapshot,
|
||||
normalizeStatus,
|
||||
} from "./reports"
|
||||
import { requireStaff } from "./rbac"
|
||||
|
|
@ -294,7 +295,7 @@ const metricResolvers: Record<string, MetricResolver> = {
|
|||
queueIds,
|
||||
)
|
||||
const resolvedTickets = filterTicketsByQueue(
|
||||
await fetchScopedTicketsByResolvedRange(ctx, tenantId, viewer, startMs, endMs, companyId),
|
||||
await fetchScopedTicketsByResolvedRangeSnapshot(ctx, tenantId, viewer, startMs, endMs, companyId),
|
||||
queueIds,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue