aboutsummaryrefslogtreecommitdiff
path: root/models/polls
diff options
context:
space:
mode:
Diffstat (limited to 'models/polls')
-rw-r--r--models/polls/poll.schema.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts
index d495e4b..2f39aa1 100644
--- a/models/polls/poll.schema.ts
+++ b/models/polls/poll.schema.ts
@@ -17,7 +17,12 @@ export interface PollSchema extends Document {
export const imageDataSchema = {
url: String,
- votes: [Types.ObjectId]
+ votes: [
+ {
+ type: Types.ObjectId,
+ ref: 'vote'
+ }
+ ]
};
export const pollSchema = new Schema({