Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
414 B
2
Indexable
Never
const insertNewSale = async () => {
  const timeAdded = new Date();
  const newSale = await salesModel.insertNewSale(timeAdded);
  return newSale;
};

const insertProductIntoSale = async (newSale) => {
  const addNewSale = await insertNewSale();
  const { insertId } = addNewSale;
  await salesModel.insertProductIntoSale(insertId, newSale);
  return insertId;
};

// EXPORTAÇÃO KRLLLLLLLL
insertProductIntoSale,
Leave a Comment