Answer the question
In order to leave comments, you need to log in
Why is an empty object returned?
There is a method, all data from the database is received in the console
get = async () => {
const allUsers = await user.findAll({raw:true});
console.log(allUsers)
return allUsers;
}
getUser = () => {
return MethodsDB.get();
}
get = (req, res) => {
res
.header('Access-Control-Allow-Origin', '*')
.status(200)
.send(user: this.service.getUser())
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question