From 4697b15b6958d03e6bdf16be2ffbaa10b871c271 Mon Sep 17 00:00:00 2001 From: Kosztyk <36381705+Kosztyk@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:48:31 +0200 Subject: [PATCH] Add files via upload --- src/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index c163e74..c93e7eb 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -18,6 +18,7 @@ import { root } from "./pages/root"; import { upload } from "./pages/upload"; import { user } from "./pages/user"; import { healthcheck } from "./pages/healthcheck"; +import { antivirus } from "./pages/antivirus"; // 👈 NEW export const uploadsDir = "./data/uploads/"; export const outputDir = "./data/output/"; @@ -50,6 +51,7 @@ const app = new Elysia({ .use(listConverters) .use(chooseConverter) .use(healthcheck) + .use(antivirus) // 👈 register the antivirus toggle API .onError(({ error }) => { console.error(error); }); @@ -67,13 +69,19 @@ if (process.env.NODE_ENV !== "production") { app.listen(3000); -console.log(`🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}${WEBROOT}`); +console.log( + `🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}${WEBROOT}`, +); const clearJobs = () => { const jobs = db .query("SELECT * FROM jobs WHERE date_created < ?") .as(Jobs) - .all(new Date(Date.now() - AUTO_DELETE_EVERY_N_HOURS * 60 * 60 * 1000).toISOString()); + .all( + new Date( + Date.now() - AUTO_DELETE_EVERY_N_HOURS * 60 * 60 * 1000, + ).toISOString(), + ); for (const job of jobs) { // delete the directories