Skip to content

Commit

Permalink
build the url for index settings and alias using path.join
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Feb 10, 2023
1 parent b697236 commit 76ae965
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions searchlib/lib/getIndexInfo.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import superagent from 'superagent';
import * as path from 'path';

export default async function getIndexInfo(config) {
const { host, elastic_index } = config;
const settings_url = path.join(host, elastic_index, '_settings');
const alias_url = path.join(host, elastic_index, '_alias');

const settings_url = `${host}/${elastic_index}/_settings`;
const alias_url = `${host}/${elastic_index}/_alias`;
try {
const settings_resp = await superagent
.get(settings_url)
Expand Down

0 comments on commit 76ae965

Please sign in to comment.