diff --git a/models/utils/index.js b/models/utils/index.js index 9777f5f..8046dce 100644 --- a/models/utils/index.js +++ b/models/utils/index.js @@ -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 { @@ -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 }) diff --git a/package.json b/package.json index 58807ee..2837c47 100644 --- a/package.json +++ b/package.json @@ -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",