mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: 修复 ESLint 错误 - if 语句花括号和箭头函数简写
This commit is contained in:
@@ -795,7 +795,9 @@ class RedisClient {
|
|||||||
* 获取使用了指定模型的 Key IDs(OR 逻辑)
|
* 获取使用了指定模型的 Key IDs(OR 逻辑)
|
||||||
*/
|
*/
|
||||||
async getKeyIdsWithModels(keyIds, models) {
|
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 client = this.getClientSafe()
|
||||||
const result = new Set()
|
const result = new Set()
|
||||||
|
|||||||
@@ -474,9 +474,9 @@ async function getApiKeysSortedByCostCustom(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. 转换为数组并排序
|
// 2. 转换为数组并排序
|
||||||
const sortedEntries = [...costs.entries()].sort((a, b) => {
|
const sortedEntries = [...costs.entries()].sort((a, b) =>
|
||||||
return sortOrder === 'desc' ? b[1] - a[1] : a[1] - b[1]
|
sortOrder === 'desc' ? b[1] - a[1] : a[1] - b[1]
|
||||||
})
|
)
|
||||||
const rankedKeyIds = sortedEntries.map(([keyId]) => keyId)
|
const rankedKeyIds = sortedEntries.map(([keyId]) => keyId)
|
||||||
|
|
||||||
// 3. 批量获取 API Key 基础数据
|
// 3. 批量获取 API Key 基础数据
|
||||||
|
|||||||
Reference in New Issue
Block a user