style: 修复代码格式问题,包括空格和缩进

调整多个服务文件中的代码格式,统一空格和缩进规范
This commit is contained in:
zhuotianyuan 2026-01-30 15:02:35 +08:00
parent 4bde698625
commit e30cce45b7
4 changed files with 63 additions and 61 deletions

View File

@ -1205,10 +1205,12 @@ public async fetchMediaPaged(site: any, params: Partial<WpMediaGetListParams> =
throw new Error('source_url 不存在');
}
// 下载源文件为 Buffer
const resp = await axios.get(srcUrl, { responseType: 'arraybuffer', timeout: 30000,
const resp = await axios.get(srcUrl, {
responseType: 'arraybuffer', timeout: 30000,
headers: {
'User-Agent': 'Mozilla/5.0 (compatible; Node.js Axios)',
} });
}
});
const inputBuffer = Buffer.from(resp.data);
// 条件判断 如果下载的 Buffer 为空则抛出错误
if (!inputBuffer || inputBuffer.length === 0) {