feat(ocp): prodlink check added
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user