import { tryCatch } from "../../../../globalUtils/tryCatch.js"; import { query } from "../../../sqlServer/prodSqlServer.js"; import { lotQuery } from "../../../sqlServer/querys/ocp/lots.js"; export const getLots = async () => { const { data: lotInfo, error: lotError } = await tryCatch( query(lotQuery, "Alplalabel online lots") ); if (lotError) { return { success: false, message: "There was an error getting the lots", data: lotError, }; } // if (!lotInfo.data.success) { // return { // success: false, // message: "There was an error getting the lots", // data: lotInfo.data.message, // }; // } return { success: true, message: "Current active lots that are technically released.", data: lotInfo, }; };