Fix/elastic search delete (#9492)
* Make sure json param isn't included in delete * lint
This commit is contained in:
parent
f6c7b05ea3
commit
7ce31d64cb
1 changed files with 8 additions and 4 deletions
|
@ -80,11 +80,11 @@ const SCHEMA: Integration = {
|
|||
delete: {
|
||||
type: QueryType.FIELDS,
|
||||
fields: {
|
||||
index: {
|
||||
id: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
},
|
||||
id: {
|
||||
index: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
},
|
||||
|
@ -164,9 +164,13 @@ class ElasticSearchIntegration implements IntegrationBase {
|
|||
}
|
||||
}
|
||||
|
||||
async delete(query: object) {
|
||||
async delete(query: { id: string; index: string }) {
|
||||
const { id, index } = query
|
||||
try {
|
||||
const result = await this.client.delete(query)
|
||||
const result = await this.client.delete({
|
||||
id,
|
||||
index,
|
||||
})
|
||||
return result.body
|
||||
} catch (err) {
|
||||
console.error("Error deleting from elasticsearch", err)
|
||||
|
|
Loading…
Reference in a new issue