23 lines
590 B
TypeScript
23 lines
590 B
TypeScript
import {OpenAPIHono} from "@hono/zod-openapi";
|
|
|
|
// routes
|
|
import manualLabelLog from "./routes/manualPrintLog.js";
|
|
|
|
import {db} from "../../../database/dbclient.js";
|
|
import {settings} from "../../../database/schema/settings.js";
|
|
|
|
const app = new OpenAPIHono();
|
|
|
|
const routes = [manualLabelLog] as const;
|
|
const setting = await db.select().from(settings);
|
|
|
|
const appRoutes = routes.forEach((route) => {
|
|
app.route("/ocp", route);
|
|
});
|
|
|
|
app.all("/ocp/*", (c) => {
|
|
return c.json({success: false, message: "You have encounters a ocp route that dose not exist."});
|
|
});
|
|
|
|
export default app;
|