We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 967ee22 commit 4101b4fCopy full SHA for 4101b4f
models/polls/poll.model.ts
@@ -1,10 +1,5 @@
1
import { Model, model } from 'mongoose';
2
import { PollSchema, pollSchema } from './poll.schema';
3
4
-pollSchema.methods.vote = function(userId: string, which: 'left' | 'right'): PollSchema {
5
- this.contents[which].votes.push(userId);
6
- return this.save();
7
-}
8
-
9
export default model<PollSchema, Model<PollSchema>>('Poll', pollSchema);
10
0 commit comments