diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-06-12 20:21:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 20:21:30 +0300 |
commit | 1860396a1286936374ab88937da3e0b6b9b1a36d (patch) | |
tree | eb905fa1307833c1ab856c387be2fa533ed2ea34 /models/polls/poll.schema.ts | |
parent | 0ecf99e2749fe60a20e86b266c6019ebb56e021a (diff) | |
parent | 7e4ebee9a0e56546d6dce76c5c48d6d13371c689 (diff) | |
download | which-api-1860396a1286936374ab88937da3e0b6b9b1a36d.tar.gz |
Merge pull request #6 from eug-vs/eslint
Eslint
Diffstat (limited to 'models/polls/poll.schema.ts')
-rw-r--r-- | models/polls/poll.schema.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index 83de688..bc6d497 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -1,5 +1,5 @@ import { Document, Schema, Types } from 'mongoose'; -import { User } from '../users/user.schema' +import { User } from '../users/user.schema'; export interface ImageData { url: string; @@ -22,14 +22,14 @@ export interface PollSchema extends Document, Omit<Poll, 'author'> { const imageDataSchema = { url: String, votes: Number -} +}; export const pollSchema = new Schema({ contents: { left: imageDataSchema, right: imageDataSchema }, - authorId: { + authorId: { type: Types.ObjectId, ref: 'User' } |