Skip to content

Commit

Permalink
perf: axios 1.7.7 -> 1.7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
XasYer committed Dec 1, 2024
1 parent 81045e3 commit 6c48870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions models/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export async function getImgUrlBuffer (url, retry = 3) {
retry = Number(retry) || 3
for (let i = 0; i < retry; i++) {
try {
const buffer = await request.get(url, { responseType: 'arraybuffer', baseUrl: '' }).then(res => res.data)
const buffer = await request.get(url, { responseType: 'arraybuffer', baseURL: '' }).then(res => res.data)
if (Version.BotName === 'Karin') {
return `base64://${buffer.toString('base64')}`
} else {
Expand All @@ -248,7 +248,7 @@ export async function saveImg (url, retry = 3) {
for (let i = 0; i < retry; i++) {
try {
let ext = ''
const buffer = await request.get(url, { responseType: 'arraybuffer', baseUrl: '' }).then(res => {
const buffer = await request.get(url, { responseType: 'arraybuffer', baseURL: '' }).then(res => {
ext = res.headers['content-type']?.split('/')?.pop() || 'png'
return res.data
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {},
"dependencies": {
"axios": "^1.7.7",
"axios": "^1.7.8",
"chalk": "^5.3.0",
"lodash": "^4.17.21",
"moment": "^2.30.1",
Expand Down

0 comments on commit 6c48870

Please sign in to comment.