`
function returnMeetings(query) {
return new Promise((reject, resolve) => {
Meeting.find(query, (err, foundMeetings) => {
if (err) {
return reject(err)
}
console.log(`The resolved meetings are ${foundMeetings}`)
return resolve(foundMeetings);
})
})
}
`
function returnMeetings(query) {
return new Promise((reject, resolve) => {
Meeting.find(query, (err, foundMeetings) => {
if (err) {
return reject(err)
}
console.log(`The resolved meetings are ${foundMeetings}`)
return resolve(foundMeetings);
})
})
}
`