model issue

main
Ayush Mukherjee 4 years ago
parent 98bd4f60b6
commit 8d604819fc

@ -59,10 +59,10 @@ const rosterFns = {
const matchFns = { const matchFns = {
getAll: async () => { getAll: async () => {
return await matches.find().populate('orange').populate('blue').populate('stream').exec() return await matches.find().populate('orange').populate('blue').exec()
}, },
getById: async (id) => { getById: async (id) => {
return await matches.findById(id).populate('orange').populate('blue').populate('stream').exec() return await matches.findById(id).populate('orange').populate('blue').exec()
}, },
update: async(id, data) => { update: async(id, data) => {
return await matches.findByIdAndUpdate(id, data).exec() return await matches.findByIdAndUpdate(id, data).exec()

Loading…
Cancel
Save