bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/pollStarted.js

14 lines
317 B
JavaScript
Raw Normal View History

2016-10-21 21:21:09 +08:00
import { check } from 'meteor/check';
import addPoll from '../modifiers/addPoll';
2017-10-12 08:33:57 +08:00
export default function pollStarted({ body }, meetingId) {
const { userId } = body;
const { poll } = body;
2016-10-21 21:21:09 +08:00
check(meetingId, String);
2017-10-12 08:33:57 +08:00
check(userId, String);
2016-10-21 21:21:09 +08:00
check(poll, Object);
2017-10-12 08:33:57 +08:00
return addPoll(meetingId, userId, poll);
2016-10-21 21:21:09 +08:00
}