Skip to content

Commit 4101b4f

Browse files
committed
fix: get rid of poll.vote function
1 parent 967ee22 commit 4101b4f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

models/polls/poll.model.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { Model, model } from 'mongoose';
22
import { PollSchema, pollSchema } from './poll.schema';
33

4-
pollSchema.methods.vote = function(userId: string, which: 'left' | 'right'): PollSchema {
5-
this.contents[which].votes.push(userId);
6-
return this.save();
7-
}
8-
94
export default model<PollSchema, Model<PollSchema>>('Poll', pollSchema);
105

0 commit comments

Comments
 (0)