diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-12 20:08:58 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-12 20:08:58 +0300 |
commit | 2a4e1ff734533a026ebf4122c31355e2dffba1b2 (patch) | |
tree | e74bb1610373c4984ca9df11f9161b0abbd7f443 /models/polls | |
parent | 755889e7c1c74b0bd7677fc513d04473689eaf57 (diff) | |
download | which-api-2a4e1ff734533a026ebf4122c31355e2dffba1b2.tar.gz |
style: fix some eslint errors
Diffstat (limited to 'models/polls')
-rw-r--r-- | models/polls/poll.model.ts | 4 | ||||
-rw-r--r-- | models/polls/poll.schema.ts | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/models/polls/poll.model.ts b/models/polls/poll.model.ts index be1f604..7f6be9a 100644 --- a/models/polls/poll.model.ts +++ b/models/polls/poll.model.ts @@ -1,5 +1,5 @@ -import { Model, model } from "mongoose" +import { Model, model } from 'mongoose'; import { PollSchema, pollSchema } from './poll.schema'; -export default model<PollSchema, Model<PollSchema>>("Poll", pollSchema); +export default model<PollSchema, Model<PollSchema>>('Poll', pollSchema); 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' } |