From cc7e97d53d07bb5dfa6d3c5f12e4ab5aee3920e5 Mon Sep 17 00:00:00 2001 From: Ordis <134585663+OrdisPrime@users.noreply.github.com> Date: Sun, 4 Jun 2023 02:58:40 +0200 Subject: [PATCH] 3 --- src/controllers/api/inventoryController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 2eb2e5b4..c7ad069c 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -12,7 +12,7 @@ const inventoryController: RequestHandler = async (request: Request, response: R } console.log(accountId); - const inventory = await Inventory.findOne({ accountOwnerId: accountId }); // has the accountOwnerId field to find a corresponding inventory + const inventory = await Inventory.findOne({ accountOwnerId: accountId }); if (!inventory) { response.status(400).json({ error: "inventory was undefined" }); @@ -21,7 +21,7 @@ const inventoryController: RequestHandler = async (request: Request, response: R const inventoryJSON = inventory.toJSON(); - const inventoreResponse = toInventoryResponse(inventoryJSON); // remove the accountOwnerId for the response + const inventoreResponse = toInventoryResponse(inventoryJSON); response.json(inventoreResponse); };