Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*could not replicate or test locally* Temporarily removing performance heavy query #2508

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ export class CaseManagementController {
activeMonitorings: true,
updatedAt: true,
},
where: {
Counterparty: {
every: {
endUserId: null,
},
},
},
take: searchQueryParams.page.size,
skip: (searchQueryParams.page.number - 1) * searchQueryParams.page.size,
},
Expand All @@ -161,19 +154,19 @@ export class CaseManagementController {
tags: string[];
}>;
businesses: Array<Pick<Business, 'companyName'>>;
Counterparty: {
Counterparty: Array<{
alerts: Array<{
id: string;
}>;
};
}>;
}
>;

return typedEndUsers.map(endUser => {
const tag = endUser.workflowRuntimeData?.[0]?.tags?.find(
tag => !!tagToKyc[tag as keyof typeof tagToKyc],
);
const alerts = endUser.Counterparty?.alerts;
const alerts = endUser.Counterparty?.flatMap(({ alerts }) => alerts);
const checkIsMonitored = () =>
Array.isArray(endUser.activeMonitorings) && !!endUser.activeMonitorings?.length;
const getMatches = () => {
Expand Down