model issue

main
Ayush Mukherjee 4 years ago
parent 4b0860cbf4
commit 1bf671fdfe

@ -85,10 +85,11 @@ const matchFns = {
const streamFns = { const streamFns = {
getAll: async () => { getAll: async () => {
return await streams.find().populate('event').populate({ return await streams.find().exec()
path: 'matches', // return await streams.find().populate('event').populate({
populate: [{ path: 'orange' }, { path: 'blue' }], // path: 'matches',
}).populate('casters').populate('hosts').exec() // populate: [{ path: 'orange' }, { path: 'blue' }],
// }).populate('casters').populate('hosts').exec()
}, },
getById: async (id) => { getById: async (id) => {
return await streams.findById(id).populate('event').populate('matches').populate('casters').populate('hosts').exec() return await streams.findById(id).populate('event').populate('matches').populate('casters').populate('hosts').exec()

Loading…
Cancel
Save