diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-22 21:12:07 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-22 21:12:07 +0300 |
commit | 4101b4ff7a5c328164fe74ebfa3c42b82f332c43 (patch) | |
tree | 2bf6ee00e1671b2e55519b77129af86c99163fc5 | |
parent | 967ee2225a874dc114079882d737a25a487404be (diff) | |
download | which-api-4101b4ff7a5c328164fe74ebfa3c42b82f332c43.tar.gz |
fix: get rid of poll.vote function
-rw-r--r-- | models/polls/poll.model.ts | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/models/polls/poll.model.ts b/models/polls/poll.model.ts index 6f3d088..7f6be9a 100644 --- a/models/polls/poll.model.ts +++ b/models/polls/poll.model.ts @@ -1,10 +1,5 @@ import { Model, model } from 'mongoose'; import { PollSchema, pollSchema } from './poll.schema'; -pollSchema.methods.vote = function(userId: string, which: 'left' | 'right'): PollSchema { - this.contents[which].votes.push(userId); - return this.save(); -} - export default model<PollSchema, Model<PollSchema>>('Poll', pollSchema); |