mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 13:05:15 +00:00
Merge pull request #1077 from freqtrade/dependabot/npm_and_yarn/main/axios-1.2.2
build(deps): bump axios from 1.2.1 to 1.2.2
This commit is contained in:
commit
7e7ba655f9
|
@ -19,7 +19,7 @@
|
||||||
"@popperjs/core": "^2.11.6",
|
"@popperjs/core": "^2.11.6",
|
||||||
"@vuepic/vue-datepicker": "^3.6.4",
|
"@vuepic/vue-datepicker": "^3.6.4",
|
||||||
"@vueuse/core": "^9.10.0",
|
"@vueuse/core": "^9.10.0",
|
||||||
"axios": "^1.2.1",
|
"axios": "^1.2.2",
|
||||||
"bootstrap": "^5.2.3",
|
"bootstrap": "^5.2.3",
|
||||||
"bootstrap-vue-3": "^0.5.0",
|
"bootstrap-vue-3": "^0.5.0",
|
||||||
"bootswatch": "^5.2.3",
|
"bootswatch": "^5.2.3",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
import axios from 'axios';
|
import axios, { AxiosHeaders } from 'axios';
|
||||||
import { UserService } from './userService';
|
import { UserService } from './userService';
|
||||||
|
|
||||||
export function useApi(userService: UserService, botId: string) {
|
export function useApi(userService: UserService, botId: string) {
|
||||||
|
@ -10,15 +10,18 @@ export function useApi(userService: UserService, botId: string) {
|
||||||
});
|
});
|
||||||
// Sent auth headers interceptor
|
// Sent auth headers interceptor
|
||||||
api.interceptors.request.use(
|
api.interceptors.request.use(
|
||||||
(config) => {
|
(request) => {
|
||||||
const custconfig = config;
|
|
||||||
const token = userService.getAccessToken();
|
const token = userService.getAccessToken();
|
||||||
// Append token to each request
|
try {
|
||||||
if (token) {
|
if (token) {
|
||||||
// Merge custconfig dicts
|
request.headers = request.headers as AxiosHeaders;
|
||||||
custconfig.headers = { ...config.headers, ...{ Authorization: `Bearer ${token}` } };
|
// Append token to each request
|
||||||
|
request.headers.set('Authorization', `Bearer ${token}`);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
}
|
}
|
||||||
return custconfig;
|
return request;
|
||||||
},
|
},
|
||||||
(error) => Promise.reject(error),
|
(error) => Promise.reject(error),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1875,10 +1875,10 @@ aws4@^1.8.0:
|
||||||
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
|
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
|
||||||
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
|
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
|
||||||
|
|
||||||
axios@^1.2.1:
|
axios@^1.2.2:
|
||||||
version "1.2.1"
|
version "1.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.1.tgz#44cf04a3c9f0c2252ebd85975361c026cb9f864a"
|
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.2.tgz#72681724c6e6a43a9fea860fc558127dbe32f9f1"
|
||||||
integrity sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==
|
integrity sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
follow-redirects "^1.15.0"
|
follow-redirects "^1.15.0"
|
||||||
form-data "^4.0.0"
|
form-data "^4.0.0"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user