From 402eeb42301cbce4d57edd09d418f308c4d69e43 Mon Sep 17 00:00:00 2001 From: Niceygy Date: Sat, 16 Mar 2024 13:04:02 +0000 Subject: [PATCH] Fix invalid requests in worker.js --- src/worker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/worker.js b/src/worker.js index 4b4d333..671d16b 100644 --- a/src/worker.js +++ b/src/worker.js @@ -22,10 +22,11 @@ async function cron(env, sendMsg) { const value = await KV1.get(name); if (!name || name == 'total' || name.toString().includes('%2F') || name.toString().includes('%3F') || name.toString().includes('%3D')) { if (!name) { + console.log('Invalid Repo, skipping'); } else { await KV1.delete(name); + console.log('Invalid Repo, deleting'); } - console.log('Invalid Repo, skipping'); } else { repos.push({ name, count: parseInt(value) }); Dtotal += parseInt(value); //calc total downloads