feat(ocp): prodlink check added

This commit is contained in:
2025-03-25 18:56:36 -05:00
parent 51267f5202
commit f9cd3fb881
3 changed files with 99 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import { settings } from "../../../database/schema/settings.js";
import updateprinters from "./routes/printers/updatePrinters.js";
import { updatePrinters } from "./controller/printers/updatePrinters.js";
import getLots from "./routes/lots/getLots.js";
import getLabels from "./routes/labeling/getLabels.js";
const app = new OpenAPIHono();
@@ -18,6 +19,8 @@ const routes = [
updateprinters,
// lots
getLots,
// labeling
getLabels,
] as const;
const setting = await db.select().from(settings);
@@ -33,6 +36,8 @@ app.all("/ocp/*", (c) => {
});
// run the printer update on restart just to keep everything good
updatePrinters();
setTimeout(() => {
updatePrinters();
}, 3 * 1000);
export default app;