test(outbound): test for outbound deliveryes edit
This commit is contained in:
@@ -86,6 +86,14 @@ const current: any = [
|
||||
"Returns all Deliverys in selected date range IE: 1/1/2025 to 1/31/2025",
|
||||
criteria: "start,end", // uncomment this out once the improt process can be faster
|
||||
},
|
||||
{
|
||||
name: "Fake Edi Update",
|
||||
endpoint: "/api/datamart/fakeediupdate",
|
||||
// description: "Returns all inventory, by default excludes running numebrs, also excludes inv locations.",
|
||||
description:
|
||||
"Returns all open orders to correct and resubmit, leaving blank will get everything putting an address only returns the specified address",
|
||||
criteria: "address", // uncomment this out once the improt process can be faster
|
||||
},
|
||||
];
|
||||
|
||||
app.openapi(
|
||||
|
||||
@@ -15,6 +15,7 @@ import postBulkOrders from "./route/dm/bulkOrdersIn.js";
|
||||
import standardTemplate from "./route/dm/getStandardTemplate.js";
|
||||
import standardForcasttemplate from "./route/dm/getStandardForecastTemplate.js";
|
||||
import postForecast from "./route/dm/forecastIn.js";
|
||||
import outbound from "./route/getOutbound.js";
|
||||
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
@@ -37,6 +38,8 @@ const routes = [
|
||||
standardTemplate,
|
||||
postForecast,
|
||||
standardForcasttemplate,
|
||||
// outbound deliveries
|
||||
outbound,
|
||||
] as const;
|
||||
|
||||
// app.route("/server", modules);
|
||||
|
||||
45
server/services/logistics/route/getOutbound.ts
Normal file
45
server/services/logistics/route/getOutbound.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
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";
|
||||
|
||||
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: "api/sqlProd/close" });
|
||||
|
||||
const body = await c.req.json();
|
||||
|
||||
return c.json({
|
||||
success: true,
|
||||
message: "testing",
|
||||
data: [],
|
||||
});
|
||||
}
|
||||
);
|
||||
export default app;
|
||||
Reference in New Issue
Block a user