diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-28 16:13:34 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-28 16:13:34 +0300 |
commit | 302a76985cef867f509a4180387cc45e934452d5 (patch) | |
tree | c79d2d95a79a9b452c7161ef0303e873fe7be0c1 /models/votes/vote.schema.ts | |
parent | e63122d84c65f30eb1e063504e7f16a05eb769f1 (diff) | |
download | which-api-302a76985cef867f509a4180387cc45e934452d5.tar.gz |
feat: improve votes
Diffstat (limited to 'models/votes/vote.schema.ts')
-rw-r--r-- | models/votes/vote.schema.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/models/votes/vote.schema.ts b/models/votes/vote.schema.ts index 63ba212..d8128b3 100644 --- a/models/votes/vote.schema.ts +++ b/models/votes/vote.schema.ts @@ -1,12 +1,10 @@ import { Document, Schema, Types } from 'mongoose'; import { Vote } from 'which-types'; -export interface VoteSchema extends Document, Omit<Vote, '_id'> { - password: string; -} +export interface VoteSchema extends Document, Omit<Vote, '_id'> {}; export const voteSchema = new Schema({ - userId: { + authorId: { type: Types.ObjectId, ref: 'user', required: true |