Fix build errors

This commit is contained in:
Darren Clarke 2024-04-21 20:47:55 +02:00
parent f93c4ad317
commit e720336768
22 changed files with 91 additions and 96 deletions

View file

@ -348,8 +348,8 @@ export const performLeafcutterQuery = async (
};
if (searchQuery.relativeDate.values.length > 0) {
/*
searchQuery.relativeDate.values.forEach((value: string) => {
// @ts-expect-error
body.query.bool.must.push({
range: {
date: {
@ -358,9 +358,11 @@ export const performLeafcutterQuery = async (
},
});
});
*/
}
if (searchQuery.startDate.values.length > 0) {
/*
searchQuery.startDate.values.forEach((value: string) => {
// @ts-expect-error
body.query.bool.must.push({
@ -370,10 +372,12 @@ export const performLeafcutterQuery = async (
},
},
});
});
})
; */
}
if (searchQuery.endDate.values.length > 0) {
/*
searchQuery.endDate.values.forEach((value: string) => {
// @ts-expect-error
body.query.bool.must.push({
@ -384,69 +388,88 @@ export const performLeafcutterQuery = async (
},
});
});
*/
}
if (searchQuery.incidentType.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "incident.keyword": searchQuery.incidentType.values },
});
*/
}
if (searchQuery.targetedGroup.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "targeted_group.keyword": searchQuery.targetedGroup.values },
});
*/
}
if (searchQuery.platform.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.platform.values },
});
*/
}
if (searchQuery.device.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.device.values },
});
*/
}
if (searchQuery.service.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.service.values },
});
*/
}
if (searchQuery.maker.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.maker.values },
});
*/
}
if (searchQuery.subregion.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "region.keyword": searchQuery.subregion.values },
});
*/
}
if (searchQuery.country.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "country.keyword": searchQuery.country.values },
});
*/
}
if (searchQuery.continent.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "continent.keyword": searchQuery.continent.values },
});
*/
}
const dataResponse = await client.search({

File diff suppressed because one or more lines are too long