aboutsummaryrefslogtreecommitdiff
path: root/models/polls
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-12 20:08:58 +0300
committereug-vs <eug-vs@keemail.me>2020-06-12 20:08:58 +0300
commit2a4e1ff734533a026ebf4122c31355e2dffba1b2 (patch)
treee74bb1610373c4984ca9df11f9161b0abbd7f443 /models/polls
parent755889e7c1c74b0bd7677fc513d04473689eaf57 (diff)
downloadwhich-api-2a4e1ff734533a026ebf4122c31355e2dffba1b2.tar.gz
style: fix some eslint errors
Diffstat (limited to 'models/polls')
-rw-r--r--models/polls/poll.model.ts4
-rw-r--r--models/polls/poll.schema.ts6
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'
}