Update app/api/admin/reset-all/route.ts

This commit is contained in:
2025-06-23 13:05:36 +03:00
parent 24b25e33a6
commit 38cdc8f523

View File

@@ -13,7 +13,7 @@ export async function POST(request: NextRequest) {
if (lastReset.length > 0) {
const lastResetTime = new Date(lastReset[0].timestamp).getTime()
const now = new Date().getTime()
const cooldownMs = 2 * 60 * 1000 // 2 minutes in milliseconds
const cooldownMs = 2 * 60 * 10 // 2 minutes in milliseconds
const timeSinceReset = now - lastResetTime
@@ -26,7 +26,7 @@ export async function POST(request: NextRequest) {
})
if (timeSinceReset < cooldownMs) {
const remainingSeconds = Math.ceil((cooldownMs - timeSinceReset) / 1000)
const remainingSeconds = Math.ceil((cooldownMs - timeSinceReset) / 10)
return NextResponse.json(
{
error: `יש להמתין ${remainingSeconds} שניות בין איפוסים`,