|
|
|
@ -92,13 +92,13 @@ const streamFns = {
|
|
|
|
|
return await streams.find().populate('event').populate({
|
|
|
|
|
path: 'matches',
|
|
|
|
|
populate: [{ path: 'orange' }, { path: 'blue' }],
|
|
|
|
|
}).populate('casters').populate('hosts').exec()
|
|
|
|
|
}).populate('casters').populate('hosts').lean().exec()
|
|
|
|
|
},
|
|
|
|
|
getById: async (id) => {
|
|
|
|
|
return await streams.findById(id).populate('event').populate({
|
|
|
|
|
path: 'matches',
|
|
|
|
|
populate: [{ path: 'orange' }, { path: 'blue' }],
|
|
|
|
|
}).populate('casters').populate('hosts').exec()
|
|
|
|
|
}).populate('casters').populate('hosts').lean().exec()
|
|
|
|
|
},
|
|
|
|
|
update: async(id, data) => {
|
|
|
|
|
return await streams.findByIdAndUpdate(id, data).exec()
|
|
|
|
|