style(ocme): format changes
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user