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