Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiqueclarke committed Apr 20, 2022
1 parent ecf9dec commit ad43dbf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions x-pack/plugins/uptime/server/rest_api/uptime_route_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { createUptimeESClient, inspectableEsQueriesMap } from '../lib/lib';
import { KibanaResponse } from '../../../../../src/core/server/http/router';
import { enableInspectEsQueries } from '../../../observability/common';

export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute) => ({
export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute, server) => ({
...uptimeRoute,
options: {
tags: ['access:uptime-read', ...(uptimeRoute?.writeAccess ? ['access:uptime-write'] : [])],
Expand All @@ -30,10 +30,11 @@ export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute) => ({
savedObjectsClient,
esClient: esClient.asCurrentUser,
});

if (
(isInspectorEnabled || server.isDev) &&
isInspectorEnabled &&
server.config.service?.username !== 'localKibanaIntegrationTestsUser'
)
) {
inspectableEsQueriesMap.set(request, []);
}

Expand Down

0 comments on commit ad43dbf

Please sign in to comment.