fix: populate blue and orange roster data from match

main v1.2.1
Ayush Mukherjee 4 years ago
parent de86df17ae
commit de4ab6f395

@ -94,7 +94,10 @@ const streamFns = {
}).populate('casters').populate('hosts').exec() }).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({
path: 'matches',
populate: [{ path: 'orange' }, { path: 'blue' }],
}).populate('casters').populate('hosts').exec()
}, },
update: async(id, data) => { update: async(id, data) => {
return await streams.findByIdAndUpdate(id, data).exec() return await streams.findByIdAndUpdate(id, data).exec()

Loading…
Cancel
Save