fix(openorders): changes to prevent and error during the get request due to missing data

This commit is contained in:
2025-04-25 10:42:17 -05:00
parent 67d47ee030
commit 9c8249b2e4
2 changed files with 4 additions and 3 deletions

View File

@@ -39,13 +39,13 @@ export const getOpenOrders = async (data: any | null) => {
} catch (error) { } catch (error) {
return { return {
success: false, success: false,
message: "Current open orders", message: "Errot getting current open orders",
data: orders.data, data: [],
}; };
} }
// add plant token in // add plant token in
const pOrders = orders.map((item: any) => { const pOrders = orders.data.map((item: any) => {
// const dateCon = new Date(item.loadingDate).toLocaleString("en-US", { // const dateCon = new Date(item.loadingDate).toLocaleString("en-US", {
// month: "numeric", // month: "numeric",
// day: "numeric", // day: "numeric",

View File

@@ -32,6 +32,7 @@ app.openapi(
); );
if (error) { if (error) {
console.log(error);
return c.json( return c.json(
{ {
success: false, success: false,