getCount: (filter = null) => {
var whereConditions = {};
if(filter != null) whereConditions.role = filter;
User
.count({
where: whereConditions,
})
.exec((err, n) => {
console.log(n);
return n;
});
}
The method above returns undefined when called, but when I console.log n, I get the correct output. How do I fix this?
via Nicholas Kajoh
No comments:
Post a Comment