Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Sep 26, 2023
1 parent 716fb12 commit 8a91c2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions x-pack/plugins/uptime/server/legacy_uptime/lib/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { DYNAMIC_SETTINGS_DEFAULT_ATTRIBUTES } from '../../constants/settings';
import { DynamicSettingsAttributes } from '../../runtime_types/settings';
import { settingsObjectId, umDynamicSettings } from './saved_objects/uptime_settings';
import { API_URLS } from '../../../common/constants';
import { UptimeServerSetup } from './adapters';

export type { UMServerLibs } from '../uptime_server';

Expand Down Expand Up @@ -287,7 +286,3 @@ export function debugESCall({
}
console.log(`\n`);
}

export const isTestUser = (server: UptimeServerSetup) => {
return server.config.service?.username === 'localKibanaIntegrationTestsUser';
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { KibanaResponse } from '@kbn/core-http-router-server-internal';
import { UMKibanaRouteWrapper } from './types';
import { isTestUser, UptimeEsClient } from '../lib/lib';
import { UptimeEsClient } from '../lib/lib';

export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute, server) => ({
...uptimeRoute,
Expand All @@ -24,7 +24,7 @@ export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute, server) =>
{
request,
uiSettings: coreContext.uiSettings,
isDev: Boolean(server.isDev && !isTestUser(server)),
isDev: Boolean(server.isDev),
}
);

Expand Down

0 comments on commit 8a91c2f

Please sign in to comment.