From 2a4e1ff734533a026ebf4122c31355e2dffba1b2 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 12 Jun 2020 20:08:58 +0300 Subject: style: fix some eslint errors --- models/polls/poll.model.ts | 4 ++-- models/polls/poll.schema.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'models/polls') 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>("Poll", pollSchema); +export default model>('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 { const imageDataSchema = { url: String, votes: Number -} +}; export const pollSchema = new Schema({ contents: { left: imageDataSchema, right: imageDataSchema }, - authorId: { + authorId: { type: Types.ObjectId, ref: 'User' } -- cgit v1.2.3