diff --git a/package.json b/package.json index a6a87d4..49d0759 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "ajv": "^8.11.0", "algoliasearch": "^4.14.2", "autoprefixer": "10.4.5", - "axios": "^1.2.0", + "axios": "^1.2.1", "chroma-js": "^2.4.2", "critters": "^0.0.16", "date-fns": "^2.29.3", diff --git a/src/backend/platforms/manifold.ts b/src/backend/platforms/manifold.ts index e4268a3..62878e0 100644 --- a/src/backend/platforms/manifold.ts +++ b/src/backend/platforms/manifold.ts @@ -16,8 +16,9 @@ async function fetchPage(endpoint: string) { url: endpoint, method: "GET", headers: { - "Content-Type": "text/html", + "Content-Type": "text/json", }, + 'accept-encoding': 'application/json' }).then((response) => response.data); // console.log(response) return response; @@ -31,6 +32,7 @@ async function fetchAllData(){ while(!end){ console.log(`Query #${counter}: ${endpoint}`) let newData = await fetchPage(endpoint) + // console.log(newData) if(Array.isArray(newData)){ allData.push(...newData) let hasReachedEnd = (newData.length == 0) || (newData[newData.length -1] == undefined) || (newData[newData.length -1].id == undefined) diff --git a/yarn.lock b/yarn.lock index 70b8f1c..50652e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2856,10 +2856,10 @@ axios@^0.21.4: dependencies: follow-redirects "^1.14.0" -axios@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.0.tgz#1cb65bd75162c70e9f8d118a905126c4a201d383" - integrity sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw== +axios@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.3.tgz#31a3d824c0ebf754a004b585e5f04a5f87e6c4ff" + integrity sha512-pdDkMYJeuXLZ6Xj/Q5J3Phpe+jbGdsSzlQaFVkMQzRUL05+6+tetX8TV3p4HrU4kzuO9bt+io/yGQxuyxA/xcw== dependencies: follow-redirects "^1.15.0" form-data "^4.0.0"