fix: 修复 ESLint 错误 - if 语句花括号和箭头函数简写

This commit is contained in:
SunSeekerX
2025-12-06 18:30:44 +08:00
parent e1df90684a
commit 0828746281
2 changed files with 6 additions and 4 deletions

View File

@@ -795,7 +795,9 @@ class RedisClient {
* 获取使用了指定模型的 Key IDsOR 逻辑)
*/
async getKeyIdsWithModels(keyIds, models) {
if (!keyIds.length || !models.length) return new Set()
if (!keyIds.length || !models.length) {
return new Set()
}
const client = this.getClientSafe()
const result = new Set()

View File

@@ -474,9 +474,9 @@ async function getApiKeysSortedByCostCustom(options) {
}
// 2. 转换为数组并排序
const sortedEntries = [...costs.entries()].sort((a, b) => {
return sortOrder === 'desc' ? b[1] - a[1] : a[1] - b[1]
})
const sortedEntries = [...costs.entries()].sort((a, b) =>
sortOrder === 'desc' ? b[1] - a[1] : a[1] - b[1]
)
const rankedKeyIds = sortedEntries.map(([keyId]) => keyId)
// 3. 批量获取 API Key 基础数据