Hello,
For the error presented you must be receiving a file as return, there are two ways to connect with asynchronous situations in javascript
Using async/await
async getData() {
return await website.findOne({ where: { idwebsite: req.params.id } })
}
const app = await getData();
res.send(app);
unless mistake so would already work:
getData() {
return website.findOne({ where: { idwebsite: req.params.id } })
}
const app = await getData();
res.send(app);
or dealing with the Privileges by then/catch
let app;
website.findOne({ where: { idwebsite: req.params.id } }).
then( data => {
app = data;
res.send(app);
})
ps. these codes have not been tested