diff --git a/src/js/repEs.js b/src/js/repEs.js index 2fcaa8699229d107a448af415f5ba12b0bcf4ab5..1d85d186ee57300ccd5594edfa54c0ade0281dca 100644 --- a/src/js/repEs.js +++ b/src/js/repEs.js @@ -51,20 +51,24 @@ class RepEs { user_token: token, content: content, }, - { withCredentials: true} - ).then(res => { - - if (res?.status === 200 && res?.data?.code === 200) { - const result = [] - res?.data?.data?.hits.forEach(element => { - result.push({ - page_content: element?._source?.content - }) - }); - resolve(result) - - } - console.info(res) + { + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + + if (res?.status === 200 && res?.data?.code === 200) { + const result = [] + res?.data?.data?.hits.forEach(element => { + result.push({ + page_content: element?._source?.content + }) + }); + resolve(result) + + } + console.info(res) }).catch((err) => {