Open fsi2000 opened 3 months ago
Get error "[ERROR] [db-api :: dbAction] cannot parse parameter: query" when using as express module. argText is already of type object - this causes JSON.parse to return an error.
Quick-fix in ./node_modules/@popovmp/dbil/lib/api.js
let argObj = null; const argText = req.body[param] || "{}"; if (typeof argText === "object") { argObj = argText; } else { argObj = JSON.parse(argText); }
Thank you for the report!
The issue is fixed in v4.8.1
Get error "[ERROR] [db-api :: dbAction] cannot parse parameter: query" when using as express module. argText is already of type object - this causes JSON.parse to return an error.
Quick-fix in ./node_modules/@popovmp/dbil/lib/api.js