style(ocme): format changes

This commit is contained in:
2025-04-03 06:07:41 -05:00
parent 96807bf77e
commit 7e34d42fda
3 changed files with 99 additions and 91 deletions

View File

@@ -1,3 +1,6 @@
import { db } from "../../../../database/dbclient.js";
import { settings } from "../../../../database/schema/settings.js";
import { tryCatch } from "../../../globalUtils/tryCatch.js";
import type { User } from "../../../types/users.js";
import { alplaStockInv } from "./cycleCount/alplaStockInventory.js";
import { emptyCount } from "./cycleCount/emptyCycleCount.js";

View File

@@ -6,7 +6,6 @@ import { query } from "../../sqlServer/prodSqlServer.js";
import { labelData } from "../../sqlServer/querys/materialHelpers/labelInfo.js";
export const postLabelData = async (data: any) => {
console.log(data);
let newData = data;
if (Array.isArray(data)) {
newData = {

View File

@@ -53,7 +53,10 @@ app.openapi(
.string()
.optional()
.openapi({ example: "Internal Server error" }),
data: z.array(z.object({})).optional().openapi({ example: [] }),
data: z
.array(z.object({}))
.optional()
.openapi({ example: [] }),
}),
},
},
@@ -81,8 +84,11 @@ app.openapi(
// make sure we have a vaid user being accessed thats really logged in
try {
const data = await c.req.json();
apiHit(c, { endpoint: "api/ocme/postRunningNumber", lastBody: data });
const postPallet = await postLabelData(data);
apiHit(c, {
endpoint: "api/ocme/postRunningNumber",
lastBody: data,
});
const postPallet: any = await postLabelData(data);
return c.json(
{
success: postPallet.success,