feat(ocp): added in service plus manual print log
This commit is contained in:
22
server/services/ocp/ocpService.ts
Normal file
22
server/services/ocp/ocpService.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user