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