bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/userVoted.js
Gabriel Carvalho de Campes a7335633d4 Refactor Poll API
2016-10-21 11:21:09 -02:00

17 lines
408 B
JavaScript

import { check } from 'meteor/check';
import updatePoll from '../modifiers/updatePoll';
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);
updatePoll(poll, meetingId, requesterId);
};