forked from w1nk/node-odbc
-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Hi there,
I've a weird issue there :
router.get("/list/", async (req, res, next) => {
let promise = new Promise(function(resolve, reject) {
db.query(queries.LIST, parameters, (err, rows, moreResultSets) => {
if (err) {
reject(err);
} else {
resolve(rows);
}
});
});
let result = await promise;
res.status(200).send(result);
});
The db.query function is somehow called 2 times and I don't know why exactly.
The first time it return an empty array, the second time the good one.
I'm using Express and it causes a lot of issues with res.send.
Thanks for the help 👍
Metadata
Metadata
Assignees
Labels
No labels