Skip to content

Commit

Permalink
EMT-67: change import for external dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nnamdifrankie committed Feb 4, 2020
1 parent 6d436b6 commit a8a8c85
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import { KibanaRequest } from 'kibana/server';
import { EndpointAppConstants } from '../../../common/types';
import { EndpointAppContext } from '../../types';
import {
fromKueryExpression,
toElasticsearchQuery,
} from '../../../../../../src/plugins/data/common/es_query/kuery/ast';
import { esKuery } from '../../../../../../src/plugins/data/server';

export const kibanaRequestToEndpointListQuery = async (
request: KibanaRequest<any, any, any>,
Expand Down Expand Up @@ -70,7 +67,7 @@ async function getPagingProperties(

function buildQueryBody(request: KibanaRequest<any, any, any>): Record<string, any> {
if (typeof request?.body?.filter === 'string') {
return toElasticsearchQuery(fromKueryExpression(request.body.filter));
return esKuery.toElasticsearchQuery(esKuery.fromKueryExpression(request.body.filter));
}
return {
match_all: {},
Expand Down

0 comments on commit a8a8c85

Please sign in to comment.