aboutsummaryrefslogtreecommitdiff
path: root/models/polls
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-22 21:12:07 +0300
committereug-vs <eug-vs@keemail.me>2020-06-22 21:12:07 +0300
commit4101b4ff7a5c328164fe74ebfa3c42b82f332c43 (patch)
tree2bf6ee00e1671b2e55519b77129af86c99163fc5 /models/polls
parent967ee2225a874dc114079882d737a25a487404be (diff)
downloadwhich-api-4101b4ff7a5c328164fe74ebfa3c42b82f332c43.tar.gz
fix: get rid of poll.vote function
Diffstat (limited to 'models/polls')
-rw-r--r--models/polls/poll.model.ts5
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);