Skip to content

Commit

Permalink
Use axios 0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed Apr 9, 2024
1 parent 3b46176 commit ac03693
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
5 changes: 3 additions & 2 deletions ui-pf4/src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/websocket": "^1.0.5",
"@types/yup": "0.29.6",
"antd": "4.7.0",
"axios": "1.6.0",
"axios": "^0.28.0",
"axios-mock-adapter": "^1.21.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.7",
Expand Down Expand Up @@ -66,7 +66,8 @@
"@types/react": "^16.9.49",
"follow-redirects": "^1.15.6",
"semver": "^7.5.4",
"tough-cookie": "^4.1.3"
"tough-cookie": "^4.1.3",
"axios": "^0.28.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
1 change: 1 addition & 0 deletions ui-pf4/src/main/webapp/src/api/apiInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const initInterceptors = (getToken: () => Promise<string>) => {
axios.interceptors.request.use(
async (config) => {
const token = await getToken();
if (!config.headers) config.headers = {};
if (token) config.headers["Authorization"] = "Bearer " + token;
return config;
},
Expand Down
17 changes: 5 additions & 12 deletions ui-pf4/src/main/webapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3503,22 +3503,15 @@ axios-mock-adapter@^1.21.2:
fast-deep-equal "^3.1.3"
is-buffer "^2.0.5"

axios@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102"
integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==
axios@^0.19.0, axios@^0.28.0:
version "0.28.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.28.1.tgz#2a7bcd34a3837b71ee1a5ca3762214b86b703e70"
integrity sha512-iUcGA5a7p0mVb4Gm/sy+FSECNkPFT4y7wt6OM/CDpO/OnNCvSs3PoMG8ibrC9jRoGYU0gUK5pXVC4NPXq6lHRQ==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axios@^0.19.0:
version "0.19.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
dependencies:
follow-redirects "1.5.10"

axobject-query@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
Expand Down Expand Up @@ -6044,7 +6037,7 @@ focus-trap@6.9.2:
dependencies:
tabbable "^5.3.2"

follow-redirects@1.5.10, follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.15.6:
follow-redirects@^1.0.0, follow-redirects@^1.15.0, 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==
Expand Down

0 comments on commit ac03693

Please sign in to comment.