bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/userVoted.js
Gabriel Carvalho de Campes 8036678aae Changes code based on feedback
2016-10-21 15:42:43 -02:00

17 lines
418 B
JavaScript

import { check } from 'meteor/check';
import updateVotes from '../modifiers/updateVotes';
export default function userVoted({ payload }) {
check(payload, Object);
const meetingId = payload.meeting_id;
const poll = payload.poll;
const requesterId = payload.presenter_id;
check(meetingId, String);
check(poll, Object);
check(requesterId, String);
return updateVotes(poll, meetingId, requesterId);
};