fix remove populate

main
Ayush Mukherjee 4 years ago
parent 4be96cf548
commit b4d4268e6e

@ -111,10 +111,10 @@ const streamFns = {
const casterFns = {
getAll: async () => {
return await casters.find().populate('streams').exec()
return await casters.find().exec()
},
getById: async (id) => {
return await casters.findById(id).populate('streams').exec()
return await casters.findById(id).exec()
},
update: async(id, data) => {
return await casters.findByIdAndUpdate(id, data).exec()
@ -137,10 +137,10 @@ const casterFns = {
const hostFns = {
getAll: async () => {
return await hosts.find().populate('streams').exec()
return await hosts.find().exec()
},
getById: async (id) => {
return await hosts.findById(id).populate('streams').exec()
return await hosts.findById(id).exec()
},
update: async(id, data) => {
return await hosts.findByIdAndUpdate(id, data).exec()

Loading…
Cancel
Save