فهرست منبع

chore: generate

opencode-agent[bot] 2 هفته پیش
والد
کامیت
3f07dffbb0
1فایلهای تغییر یافته به همراه1 افزوده شده و 3 حذف شده
  1. 1 3
      packages/console/app/src/routes/zen/util/rateLimiter.ts

+ 1 - 3
packages/console/app/src/routes/zen/util/rateLimiter.ts

@@ -7,9 +7,7 @@ import { ZenData } from "@opencode-ai/console-core/model.js"
 export function createRateLimiter(limit: ZenData.RateLimit | undefined, rawIp: string, headers: Headers) {
   if (!limit) return
 
-  const limitValue = (limit.checkHeader && !headers.get(limit.checkHeader))
-    ? limit.fallbackValue!
-    : limit.value
+  const limitValue = limit.checkHeader && !headers.get(limit.checkHeader) ? limit.fallbackValue! : limit.value
 
   const ip = !rawIp.length ? "unknown" : rawIp
   const now = Date.now()