Initial commit

This commit is contained in:
Zoe
2026-08-07 22:13:25 -05:00
commit 8006fd67f3
40 changed files with 11017 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { cleanupExpiredDrops } from "../utils/drop-store";
export default defineNitroPlugin((nitroApp) => {
cleanupExpiredDrops().catch((error) =>
console.error("[quickdrop] Initial expiry cleanup failed.", error),
);
const timer = setInterval(() => {
cleanupExpiredDrops().catch((error) =>
console.error("[quickdrop] Scheduled expiry cleanup failed.", error),
);
}, 60 * 1000);
timer.unref();
nitroApp.hooks.hook("close", () => clearInterval(timer));
});