fix(core): update

This commit is contained in:
2023-08-29 11:15:22 +02:00
parent fc87fd7ab7
commit d6a291d8d4
4 changed files with 22 additions and 32 deletions

View File

@@ -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;