diff --git a/server/services/logistics/controller/consumeMaterial.ts b/server/services/logistics/controller/consumeMaterial.ts index 208b944..698c226 100644 --- a/server/services/logistics/controller/consumeMaterial.ts +++ b/server/services/logistics/controller/consumeMaterial.ts @@ -27,7 +27,7 @@ export const consumeMaterial = async (data: Data, prod: any) => { if (barcode.length === 0) { return { success: false, - message: "The running number provided is not in stock please check if stock and try again.", + message: "The running number you've is not in stock.", }; //throw Error("The provided runningNr is not in stock"); } @@ -49,6 +49,6 @@ export const consumeMaterial = async (data: Data, prod: any) => { //console.log(results); return {success: true, message: "Material was consumed", status: results.status}; } catch (error: any) { - return {success: false, status: error.response?.status, message: error.response?.data.errors[0].message}; + return {success: false, status: 200, message: error.response?.data.errors[0].message}; } };