From 057d8201faaacb6e2d4043be4d1b283e7e692705 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Sun, 14 Mar 2021 05:44:01 +0530 Subject: [PATCH] model issue --- src/models/streams.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/models/streams.js b/src/models/streams.js index 5a64d58..2fbf63b 100644 --- a/src/models/streams.js +++ b/src/models/streams.js @@ -9,18 +9,18 @@ const streams = new Schema({ type: Schema.Types.ObjectId, ref: 'Event', }, - matches: { - type: [Schema.Types.ObjectId], + matches: [{ + type: Schema.Types.ObjectId, ref: 'Matches', - }, - casters: { - type: [Schema.Types.ObjectId], + }], + casters: [{ + type: Schema.Types.ObjectId, ref: 'Casters', - }, - hosts: { - type: [Schema.Types.ObjectId], + }], + hosts: [{ + type: Schema.Types.ObjectId, ref: 'Hosts', - }, + }], }) const Stream = model('Streams', streams)