Mongoose find().exec() promise issue [duplicate]
You're returning from the exec
callback. To use the promise from exec
, use then
on it as shown here. There's also no reason for Promise.resolve
:
return Audience.find() .exec() .then(audiences => []) .catch(err => errorHandler.handle('audienceService', err));