fix(core): update
This commit is contained in:
@@ -27,7 +27,7 @@ export class ElasticKVStore {
|
||||
|
||||
private async setupIndex() {
|
||||
try {
|
||||
const { body: indexExists } = await this.client.indices.exists({ index: this.index });
|
||||
const indexExists = await this.client.indices.exists({ index: this.index });
|
||||
|
||||
if (!indexExists) {
|
||||
await this.client.indices.create({
|
||||
@@ -72,7 +72,7 @@ export class ElasticKVStore {
|
||||
index: this.index,
|
||||
id: key
|
||||
});
|
||||
return response.body._source.value;
|
||||
return response._source['value'];
|
||||
} catch (error) {
|
||||
if (error.meta && error.meta.statusCode === 404) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user