diff --git a/src/router/api_router.js b/src/router/api_router.js index fe3c27e..6a1c652 100644 --- a/src/router/api_router.js +++ b/src/router/api_router.js @@ -448,7 +448,7 @@ router.post('/search-books', authenticate, async (req, res) => { if (trovato) { if (productfind) { - product = await Product.findOne({ _id: productfind._id }).exec(); + product = await Product.findOne({ _id: productfind._id }).lean().exec(); if (product) { const existingResult = results.find((r) => r._id.toString() === product._id.toString()); if (!existingResult) { diff --git a/src/version.txt b/src/version.txt index 2ce74da..2833ec4 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -1.2.77 \ No newline at end of file +1.2.78 \ No newline at end of file