47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
|
|
import { responses } from "../../../globalUtils/routeDefs/responses.js";
|
|
import { tryCatch } from "../../../globalUtils/tryCatch.js";
|
|
import { getCycleCountCheck } from "../controller/warehouse/cycleCountChecks/getCycleCountCheck.js";
|
|
import { getPPOO } from "../controller/warehouse/ppoo/getPPOO.js";
|
|
import { apiHit } from "../../../globalUtils/apiHits.js";
|
|
|
|
const app = new OpenAPIHono();
|
|
|
|
// const Body = z
|
|
// .object({
|
|
// age: z.number().optional().openapi({ example: 90 }),
|
|
// //email: z.string().optional().openapi({example: "s.smith@example.com"}),
|
|
// type: z.string().optional().openapi({ example: "fg" }),
|
|
// })
|
|
// .openapi("User");
|
|
app.openapi(
|
|
createRoute({
|
|
tags: ["logistics"],
|
|
summary: "outbound delivery notes",
|
|
method: "post",
|
|
path: "/outbound",
|
|
// request: {
|
|
// body: {
|
|
// content: {
|
|
// "application/json": { schema: Body },
|
|
// },
|
|
// },
|
|
// },
|
|
// description:
|
|
// "Provided a running number and lot number you can consume material.",
|
|
responses: responses(),
|
|
}),
|
|
async (c: any) => {
|
|
apiHit(c, { endpoint: "/outbound" });
|
|
|
|
const body = await c.req.json();
|
|
|
|
return c.json({
|
|
success: true,
|
|
message: "testing",
|
|
data: [],
|
|
});
|
|
}
|
|
);
|
|
export default app;
|