Skip to content

Commit

Permalink
[Search] Update connector also updates status (#165983)
Browse files Browse the repository at this point in the history
## Summary

Converting a connector from native to client now updates the connector
status.
  • Loading branch information
sphilipse authored Sep 8, 2023
1 parent 2ecd8b8 commit 9deae84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/kbn-search-connectors/lib/update_native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';

import { CONNECTORS_INDEX } from '..';
import { Connector } from '../types/connectors';
import { Connector, ConnectorStatus } from '../types/connectors';

export const putUpdateNative = async (
client: ElasticsearchClient,
Expand All @@ -19,6 +19,7 @@ export const putUpdateNative = async (
const result = await client.update<Connector>({
doc: {
is_native: isNative,
status: ConnectorStatus.CONFIGURED,
},
id: connectorId,
index: CONNECTORS_INDEX,
Expand Down

0 comments on commit 9deae84

Please sign in to comment.