diff --git a/app/api/admin/field-reset/route.ts b/app/api/admin/field-reset/route.ts index ca3ae3a..fc4606a 100644 --- a/app/api/admin/field-reset/route.ts +++ b/app/api/admin/field-reset/route.ts @@ -36,8 +36,10 @@ export async function POST(request: NextRequest) { const cooldownMs = 30 * 10 // 30 seconds for field resets if (now - lastResetTime < cooldownMs) { - return NextResponse.json({ error: "יש להמתין 30 שניות בין איפוסי תחום" }, { status: 429 }) + const remainingSeconds = Math.ceil((cooldownMs - (now - lastResetTime)) / 1000) + return NextResponse.json({ error: "יש להמתין 30 שניות בין איפוסי מסגרת", remainingSeconds }, { status: 429 }) } + } // Reset field users' statuses, but exclude locked users