feat(barcode gen): added in lane exports both single and multiple intial release

This commit is contained in:
2025-05-31 02:17:00 -05:00
parent a6844d9455
commit 2672e89005
15 changed files with 1112 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
// an external way to creating logs
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
import { responses } from "../../../globalUtils/routeDefs/responses.js";
import { apiHit } from "../../../globalUtils/apiHits.js";
import { getAllLogisticsJobs } from "../utils/logisticsIntervals.js";
const app = new OpenAPIHono({ strict: false });
app.openapi(
createRoute({
tags: ["logistics"],
summary: "Returns current active logistics intervals.",
method: "get",
path: "/activelogistics",
//middleware: authMiddleware,
responses: responses(),
}),
async (c) => {
apiHit(c, { endpoint: "/activelogistics" });
const jobs = getAllLogisticsJobs();
return c.json({
success: true,
message:
jobs.length === 0
? "There are no active logistics intervals Currently."
: "Current Active logistics intervals",
data: jobs,
});
}
);
export default app;