fix(bookin): corrections to only show the message on error vs the json
This commit is contained in:
@@ -19,7 +19,7 @@ app.openapi(
|
|||||||
summary: "Consumes material based on its running number",
|
summary: "Consumes material based on its running number",
|
||||||
method: "post",
|
method: "post",
|
||||||
path: "/consume",
|
path: "/consume",
|
||||||
middleware: authMiddleware,
|
//middleware: authMiddleware,
|
||||||
description:
|
description:
|
||||||
"Provided a running number and lot number you can consume material.",
|
"Provided a running number and lot number you can consume material.",
|
||||||
responses: {
|
responses: {
|
||||||
|
|||||||
@@ -289,11 +289,11 @@ export const labelingProcess = async ({
|
|||||||
"error",
|
"error",
|
||||||
"labeling",
|
"labeling",
|
||||||
"ocp",
|
"ocp",
|
||||||
`There was an error booking in the label: ${book?.errors[0]?.message}`
|
`There was an error booking in the label: ${book.data?.errors[0]?.message}`
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
message: `Error Booking in label: ${book?.errors[0]?.message}`,
|
message: `Error Booking in label: ${book.data?.errors[0]?.message}`,
|
||||||
data: book,
|
data: book,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user