chore: only log daily changes 6 hours after the reset

This commit is contained in:
Miodec 2025-07-19 02:08:55 +02:00
parent 2a9507ab1e
commit 255fd7f410

View file

@ -541,7 +541,12 @@ export async function addResult(
dailyLeaderboardRank <= 10 &&
completedEvent.testDuration <= 120
) {
await addLog("daily_leaderboard_top_10_result", completedEvent, uid);
const now = Date.now();
const reset = getCurrentDayTimestamp();
const limit = 6 * 60 * 60 * 1000;
if (now - reset >= limit) {
await addLog("daily_leaderboard_top_10_result", completedEvent, uid);
}
}
}