From 8fe0a6762b3ba0c3a9ee983e27036ba77ef62961 Mon Sep 17 00:00:00 2001 From: Michel Pereira Date: Sun, 24 Oct 2021 02:29:14 -0300 Subject: [PATCH] Corrige ortografia de alguns cometarios --- services/sales.js | 2 +- utils/validatorsSales.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/sales.js b/services/sales.js index 4a93d8c..9c77b1d 100644 --- a/services/sales.js +++ b/services/sales.js @@ -54,7 +54,7 @@ const create = async (soldProducts) => { // CREATING: - const insertedId = await models.create(soldProducts); // if come here, thas means all productId were found + const insertedId = await models.create(soldProducts); // if come to here, that means all productId were found // UPDATING product stock quantity: diff --git a/utils/validatorsSales.js b/utils/validatorsSales.js index 0402c14..906d43a 100644 --- a/utils/validatorsSales.js +++ b/utils/validatorsSales.js @@ -49,7 +49,7 @@ const validSaleId = (id) => { }; const decProductQtd = async (soldProducts) => { - // map every "soldProducts" passed and increment each quantity of it: + // map every "soldProducts" passed and decrement its quantity: const promises = soldProducts.map(async ({ productId, quantity }) => { const { modifiedCount } = await modelsProducts.updateQtd(productId, -quantity); @@ -69,7 +69,7 @@ const decProductQtd = async (soldProducts) => { }; const incProductQtd = async (soldProducts) => { -// map every "soldProducts" passed and increment each quantity of it: +// map every "soldProducts" passed and increment its quantity: const promises = soldProducts.map(async ({ productId, quantity }) => { const { modifiedCount } = await modelsProducts.updateQtd(productId, quantity);