Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Dec 9, 2019
1 parent 3d0e61b commit cbf30e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/watcher/plugin_definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const pluginDefinition = {
__LEGACY: {
route: server.route.bind(server),
plugins: {
elasticsearch: server.plugins.elasticsearch,
watcher: server.plugins[PLUGIN.ID],
xpack_main: server.plugins.xpack_main,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { ElasticsearchServiceSetup } from 'src/core/server';
import { once } from 'lodash';
import { elasticsearchJsPlugin } from './elasticsearch_js_plugin';
import { ServerShim } from '../types';

const callWithRequest = once((elasticsearchService: ElasticsearchServiceSetup) => {
const config = { plugins: [elasticsearchJsPlugin] };
Expand All @@ -19,8 +18,11 @@ export const callWithRequestFactory = (
request: any
) => {
return (...args: any[]) => {
return callWithRequest(elasticsearchService)
.asScoped(request)
.callAsCurrentUser(...args);
return (
callWithRequest(elasticsearchService)
.asScoped(request)
// @ts-ignore
.callAsCurrentUser(...args)
);
};
};

0 comments on commit cbf30e1

Please sign in to comment.