Skip to content

Commit

Permalink
update axios
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Aug 11, 2024
1 parent 01bdffc commit 766c7aa
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@hiveio/dhive": "^1.2.7",
"axios": "^0.21.1",
"axios": "^1.7.3",
"cors": "^2.8.5",
"express": "^4.17.1",
"hivesigner": "^3.2.5",
Expand Down
8 changes: 4 additions & 4 deletions src/server/handlers/wallet-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const echartapi = async (req: express.Request, res: express.Response) =>
const params = req.query;

const url = `${ENGINE_CHART_URL}`;
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency', 'Accept-Encoding': '*' };
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency' };

pipe(baseApiRequest(url, "GET", headers, undefined, params), res);
}
Expand All @@ -57,7 +57,7 @@ export const engineAccountHistory = (req: express.Request, res: express.Response
const params = req.query;

const url = `${ENGINE_ACCOUNT_HISTORY_URL}`;
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency', 'Accept-Encoding': '*' };
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency' };

pipe(baseApiRequest(url, "GET", headers, undefined, params), res);
}
Expand All @@ -66,15 +66,15 @@ export const engineAccountHistory = (req: express.Request, res: express.Response
//raw engine api call
const engineContractsRequest = (data: EngineRequestPayload) => {
const url = `${BASE_ENGINE_URL}/${PATH_CONTRACTS}`;
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency', 'Accept-Encoding': '*' };
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency' };

return baseApiRequest(url, "POST", headers, data)
}

//raw engine rewards api call
const engineRewardsRequest = (username:string, params:any) => {
const url = `${ENGINE_REWARDS_URL}/@${username}`;
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency', 'Accept-Encoding': '*' };
const headers = { 'Content-type': 'application/json', 'User-Agent': 'Ecency' };

return baseApiRequest(url, "GET", headers, undefined, params)
}
Expand Down
35 changes: 28 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2060,12 +2060,14 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2"
integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==

axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
axios@^1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.3.tgz#a1125f2faf702bc8e8f2104ec3a76fab40257d85"
integrity sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==
dependencies:
follow-redirects "^1.10.0"
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

babel-code-frame@^6.22.0:
version "6.26.0"
Expand Down Expand Up @@ -2991,7 +2993,7 @@ color@^3.0.0:
color-convert "^1.9.1"
color-string "^1.5.2"

combined-stream@^1.0.6, combined-stream@~1.0.6:
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
Expand Down Expand Up @@ -4367,11 +4369,16 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0, follow-redirects@^1.10.0:
follow-redirects@^1.0.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7"
integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==

follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==

for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
Expand All @@ -4396,6 +4403,15 @@ [email protected], fork-ts-checker-webpack-plugin@^3.1.1:
tapable "^1.0.0"
worker-rpc "^0.1.0"

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
Expand Down Expand Up @@ -8409,6 +8425,11 @@ proxy-addr@~2.0.5:
forwarded "~0.1.2"
ipaddr.js "1.9.1"

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
Expand Down

0 comments on commit 766c7aa

Please sign in to comment.