bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/userVoted.js
2017-12-12 11:19:24 -05:00

23 lines
443 B
JavaScript

import { check } from 'meteor/check';
import updateVotes from '../modifiers/updateVotes';
export default function userVoted({ body }, meetingId) {
const { poll } = body;
check(meetingId, String);
check(poll, {
id: String,
answers: [
{
id: Number,
key: String,
numVotes: Number,
},
],
numRespondents: Number,
numResponders: Number,
});
return updateVotes(poll, meetingId);
}