Create url object for constructing correct elastic search url

This commit is contained in:
2019-06-28 21:27:49 +02:00
parent 8e58ba49ce
commit 0139d0b0da

View File

@@ -202,7 +202,7 @@ const getEmoji = () => {
* @returns {object} List of movies and shows matching query
*/
const elasticSearchMoviesAndShows = (query) => {
const url = path.join(ELASTIC_URL, ELASTIC_INDEX, '/_search')
const url = new URL(path.join(ELASTIC_INDEX, '/_search'), ELASTIC_URL)
const body = {
"sort" : [