diff --git a/src/controller/cleanup.ts b/src/controller/cleanup.ts index 800f837..924db73 100644 --- a/src/controller/cleanup.ts +++ b/src/controller/cleanup.ts @@ -1,4 +1,4 @@ -export default async function exist(env: Env) { +export default async function cleanup(env: Env) { const expiry = new Date().setDate(new Date().getDate() - 1); return env.DB.prepare('DELETE FROM log WHERE endpoint IN ( SELECT DISTINCT endpoint FROM log WHERE timestamp < ? );').bind(expiry).run(); }