Skip to content

Commit

Permalink
fix(only show onemac): Filter out any records from dashboard that did…
Browse files Browse the repository at this point in the history
… not originate from onemac legacy or micro (#346)

* fix(only show onemac):  Filter out any reecords that did not originate from legacy or micro

* remove filter from item endpoint

* Remove unused import

* its only used in one place, so why bother
  • Loading branch information
mdial89f authored Jan 25, 2024
1 parent 93bcc8f commit 3ba6571
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/services/api/handlers/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ export const getSearchData = async (event: APIGatewayEvent) => {
query.query.bool.must.push(stateFilter);
}

// Only return records originating from OneMAC
query.query.bool.must.push({
terms: {
"origin.keyword": ["OneMAC"],
},
});

query.from = query.from || 0;
query.size = query.size || 100;

Expand Down

0 comments on commit 3ba6571

Please sign in to comment.